Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove the reject_ifs because they're no longer needed

  • Loading branch information...
commit 315cd5c4bc4b85e132a64ea4f43aa3d2b92c60e7 1 parent 7044af2
@timriley authored
View
2  app/models/assignment.rb
@@ -2,5 +2,5 @@ class Assignment < ActiveRecord::Base
belongs_to :task
has_many :steps, :dependent => :destroy
validates_presence_of :owner
- accepts_nested_attributes_for :steps, :reject_if => lambda { |a| a.values.all?(&:blank?) }, :allow_destroy => true
+ accepts_nested_attributes_for :steps, :allow_destroy => true
end
View
2  app/models/project.rb
@@ -1,5 +1,5 @@
class Project < ActiveRecord::Base
has_many :tasks, :dependent => :destroy
validates_presence_of :name
- accepts_nested_attributes_for :tasks, :reject_if => lambda { |a| a.values.all?(&:blank?) }, :allow_destroy => true
+ accepts_nested_attributes_for :tasks, :allow_destroy => true
end
View
2  app/models/task.rb
@@ -2,5 +2,5 @@ class Task < ActiveRecord::Base
belongs_to :project
has_many :assignments, :dependent => :destroy
validates_presence_of :name
- accepts_nested_attributes_for :assignments, :reject_if => lambda { |a| a.values.all?(&:blank?) }, :allow_destroy => true
+ accepts_nested_attributes_for :assignments, :allow_destroy => true
end
Please sign in to comment.
Something went wrong with that request. Please try again.