Rails Webapp Engineering
The day after I came back from Australia, I started my new job at Coupa Software. I'm absolutely loving it at the moment because of the awesome people and the amount of software I'm learning. Here's just a few that I've picked up in my first week that I'd like to jot down.
Skinny Controllers, Fat Models
Here's one article about it. It really really helps out with testing.
Association
- cmd-k clears terminal window
- rake stats
script/spec for an individual test
render_to_string - returns string, use with send_data
-
- same as Scheme accumulator I used in 61A
-
- really really easy to use reporter generator.
request.xhr? - if request is ajax-y
Getting All Tables
ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym) connection = ActiveRecord::Base.connection options[:tables] ||= connection.tables.reject { |t| %w(schema_info sessions).include?(t) }