Commit 06ad5d3055afc25a0f3d75aac99540404b05521c
1 parent
abd49391
Exists in
master
and in
27 other branches
rails3: remove unecessary mass assignment
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
app/models/contact_list.rb
@@ -16,12 +16,16 @@ class ContactList < ActiveRecord::Base | @@ -16,12 +16,16 @@ class ContactList < ActiveRecord::Base | ||
16 | 16 | ||
17 | def register_auth_error | 17 | def register_auth_error |
18 | msg = _('There was an error while authenticating. Did you enter correct login and password?') | 18 | msg = _('There was an error while authenticating. Did you enter correct login and password?') |
19 | - self.update_attributes(:fetched => true, :error_fetching => msg) | 19 | + self.fetched = true |
20 | + self.error_fetching = msg | ||
21 | + self.save! | ||
20 | end | 22 | end |
21 | 23 | ||
22 | def register_error | 24 | def register_error |
23 | msg = _('There was an error while looking for your contact list. Please, try again') | 25 | msg = _('There was an error while looking for your contact list. Please, try again') |
24 | - self.update_attributes(:fetched => true, :error_fetching => msg) | 26 | + self.fetched = true |
27 | + self.error_fetching = msg | ||
28 | + self.save! | ||
25 | end | 29 | end |
26 | 30 | ||
27 | end | 31 | end |