RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: lulalala
New Railscast about Active Model probably helps: http://railscasts.com/episodes/219-active-model
Even more optimization: use pluck to get ids:
pluck
def self.up add_column :projects, :tasks_count, :integer, :default => 0 Project.reset_column_information Project.pluck(:id).each do |p_id| Project.reset_counters p_id, :tasks end end def self.down remove_column :projects, :tasks_count end
May I ask how I can get the cache monitor at the bottom of the screen?
New Railscast about Active Model probably helps: http://railscasts.com/episodes/219-active-model
Even more optimization: use
pluck
to get ids:May I ask how I can get the cache monitor at the bottom of the screen?