RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: expilo
Rails 4 docs give slightly different syntax:
accepts_nested_attributes_for :avatar, reject_if: proc { |attributes| attributes['name'].blank? }
Sadly, I am getting ActiveModel::ForbiddenAttributesError when I try to use this recipe in Rails 4. Any idea how to update it for Rails 4?
Rails 4 docs give slightly different syntax:
Sadly, I am getting ActiveModel::ForbiddenAttributesError when I try to use this recipe in Rails 4. Any idea how to update it for Rails 4?