# to ask for it in # config/initializers/secret_token.rb # If you leave secret_token existing sessions # will be upgraded in place MyApp::Application.config.secret_token = 'p09m345n' +MyApp::Application.config.secret_key_base = ‘atelkjetq’ Monday, October 21, 13 Rails 3 signed but didn’t encrypt session cookies. Rails 4 encrypts then signs, which is more secure.
database’s slow query log # https://wiki.postgresql.org/wiki/Logging_Difficult_Queries - # Log the query plan for queries - # taking more than this (works - # with SQLite, MySQL, and - # PostgreSQL) - config.active_record.auto_explain_threshold_in_seconds = 0.5 Monday, October 21, 13
connection.select_all <<-SQL + rows = connection.select_all(<<-SQL).to_a SELECT t.id AS team_id, t.name AS team_name, … Monday, October 21, 13 Connection#select_all returns a Relation object now, and your existing code probably wants an Array