Skip to content

Commit

Permalink
use update_attributes instead of update_attribute to trigger counter …
Browse files Browse the repository at this point in the history
…cache. for issue #371
  • Loading branch information
manxingxing committed Jul 29, 2014
1 parent e7dc147 commit 7ecd24a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/dataset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def load_projects_and_authors_from_current_datafile
end

def add_datafile(datafile)
datafile.update_attribute(:dataset_id, self.id)
datafile.update_attributes(dataset: self)
self.update_attributes(filename: datafile.basename, import_status: 'new')
end

Expand Down

0 comments on commit 7ecd24a

Please sign in to comment.