- Always respect explicitly set
disabled
html attribute. (disabled: false
was ignored) - Do correctly enable inputs if permitted attributes includes a hash with multiple keys. (e.g.
permitted_attributes: [:some_attr, { first_key: [], second_key: [] }]
) - Add a
#attribute_permitted?
method to aFormBuilder
, so one can dof.attribute_permitted?(attr)
-
Make it work with Rails 5
-
Raise ruby dependency to
>= 2.2.2
-
Test agains Rails 5, too
- Fix typo
respond_to
-->respond_to?
-
Fix disabling of child attributes if only
fields_for
has permitted_attributes -
Simplify code
- Permit array attributes with
[roles: []]
, too, not only with[:roles]
. In fact it is OK to have either the symbol or a hash with the key (value is ignored). Makes this more compatible with Rail`s strong params.
- Make
fields_for
work withpermitted_attributes
even if parent form was not initialized with them.
- Different (saner?) way of initialization to fix stack level too deep errors
when classes are not cached (
Module.prepend
didn't work like it should)
- Rename
permitted_attributes
to_strong_form_permitted_attributes
because it would get overwritten if there is a helper methodpermitted_attributes
in controller
- Add CHANGELOG.md to gemspec
- Allow to use non-block syntax for nested form
link_to_add
(5ddc396d5bc03fdef8b4b69b4efcdd0333327ae2)
Initial release