diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-25 04:34:55 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-25 04:34:55 +0200 |
| commit | f7a5944a1f44ede9881d368a36eb9f7d82d6ab69 (patch) | |
| tree | 3803e9840eab4976b299a8cce969b7785b018b19 /app/models/user.rb | |
| parent | 3f236c7a0e544db94ef822f120d649ac5ee958f7 (diff) | |
Rails 4.2 model and controller fixes
- Wrap all scopes in lambdas (required in Rails 4)
- Move scopes after associations in page.rb (evaluated at load time in Rails 4)
- Convert association :order options to lambda syntax
- Remove attr_accessible from page.rb and user.rb
- Add Strong Parameters: user_params in UsersController, node_params/page_params in NodesController
- Fix clone_attributes_from: exclude id/page_id/timestamps when cloning translations
- Fix redirect_to :back → request.referer fallback in nodes_controller
- Fix node_path/publish and unlock actions: pass @node argument
Diffstat (limited to 'app/models/user.rb')
| -rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index ce5503f..a2540b5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb | |||
| @@ -21,8 +21,6 @@ class User < ActiveRecord::Base | |||
| 21 | validates_format_of :email, :with => Authentication.email_regex, | 21 | validates_format_of :email, :with => Authentication.email_regex, |
| 22 | :message => Authentication.bad_email_message | 22 | :message => Authentication.bad_email_message |
| 23 | 23 | ||
| 24 | attr_accessible :login, :email, :password, :password_confirmation, :admin | ||
| 25 | |||
| 26 | # Authenticates a user by their login name and unencrypted password. Returns the user or nil. | 24 | # Authenticates a user by their login name and unencrypted password. Returns the user or nil. |
| 27 | def self.authenticate(login, password) | 25 | def self.authenticate(login, password) |
| 28 | return nil if login.blank? || password.blank? | 26 | return nil if login.blank? || password.blank? |
