RailsCasts Pro episodes are now free!

Learn more or hide this

expilo's Profile

GitHub User: expilo

Comments by


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?