resource_params
returns permited hash when resource key is not present inparams
.use_resource_class_for_invalid_type
option for STI helpers, andRailsStuff::ResourcesController::StiHelpers::InvalidType
error instead ofActiveRecord::NotFound
for invalid type.
TransformAttrs
in favour ofNullifyBlankAttrs
(deprecated).
- Parse BigDecimals with ParamsParser.
- ParamsParser parses empty strings to
nil
(exceptparse_string
).
- Don't overwrite :location option if present.
- Don't overwrite responder and
respond_with
's mimes. #current_sort_scope
to access applied sorting rules..resource_helper
hassource
option, which accepts lambdas and strings.class
option is deprecated now in favour ofsource
.
-
Improved Statusable:
- Model are now clear from lot of helper methods.
There is single
statuses
method for statusable field which holds all helpers. .select_options
supports:only
option.- Helpers to map/unmap values for mapped statuses from external code.
- Model are now clear from lot of helper methods.
There is single
- A lot of new test and rspec helpers and configs (see RSpecHelpers, TestHelpers).
RSpecHelpers.setup
&TestHelpers.setup
to setup helpers instead of requiring files. This methods acceptsonly
&except
options.
- Use AR#update instead of #update_attributes.
Rails 5 support.
belongs_to
.resource_helper
generates enquirer method.resources_controller kaminari: false
to skip kaminari for the only controller.has_sort_scope
can use custom order method.- Fix: removed source_for_collection from action_methods.
- Statusable supports mappings (store status as integer) and suffixes.
- AssociationWriter to override
#field=
&#field_id=
in single instruction. - Limit retries count for RandomUniqAttr (default to 10).
Helpers::Translation
methods can raise errors on missing translations. It respects app'sraise_on_missing_translations
, and can be configured manually.
- Concurrency helper.
- RSpec configurator.
Misc
- RequireNested to require all files in subdirectory.
rails g concern %parent%/%module%
generator for concerns.
- TypesTracker defines scopes for every type.
- PluginManager & media queries.
-
Bypass block to
respond_with
. -
url_for_keeping_params
-
params.require_permitted