Use reports_count so that counter_cache works automatically.
This commit is contained in:
parent
b578cee759
commit
948fd8c8fa
3 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
class AddReportCountToIssues < ActiveRecord::Migration
|
||||
class AddReportsCountToIssues < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :issues, :report_count, :integer, :default => 0
|
||||
add_column :issues, :reports_count, :integer, :default => 0
|
||||
add_foreign_key :issues, :users, :column => :updated_by, :name => "issues_updated_by_fkey", :on_delete => :cascade
|
||||
add_index :issues, :updated_by
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue