mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-18 21:28:08 +01:00
move to strong_parameters of rails4.
This commit is contained in:
parent
049296fd33
commit
671f64b419
24 changed files with 153 additions and 61 deletions
|
|
@ -1,7 +1,6 @@
|
|||
class Context < ActiveRecord::Base
|
||||
|
||||
has_many :todos, -> { order("todos.due IS NULL, todos.due ASC, todos.created_at ASC").includes(:project) }, :dependent => :delete_all
|
||||
|
||||
has_many :todos, -> { order("todos.due IS NULL, todos.due ASC, todos.created_at ASC").includes(:project) }, :dependent => :delete_all
|
||||
has_many :recurring_todos, :dependent => :delete_all
|
||||
belongs_to :user
|
||||
|
||||
|
|
@ -34,8 +33,6 @@ class Context < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
attr_protected :user
|
||||
|
||||
validates_presence_of :name, :message => "context must have a name"
|
||||
validates_length_of :name, :maximum => 255, :message => "context name must be less than 256 characters"
|
||||
validates_uniqueness_of :name, :message => "already exists", :scope => "user_id"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue