1.2.0 (2014-04-30)
- Add support for Rails-style date and time parameters like
date(1i)
. - Add a decimal filter.
- Add support for disabling and modifying transactions through the
transaction
helper method. - Add support for
column_for_attribute
which provides better interoperability with gems like Formtastic and Simple Form.
1.1.7 (2014-04-30)
- Fix a bug that leaked validators among all child classes.
1.1.6 (2014-04-29)
- Fix a bug that caused nested hash error messages to be misleading.
1.1.5 (2014-03-31)
- The
transform_keys
method broke backwards compatibility because it's not available until Rails 4.0.2.
1.1.4 (2014-03-31)
- Fix an issue where non-stripped hash keys would be incorrectly converted to strings.
1.1.3 (2014-03-31)
- Fix Rubocop errors and pin the version to avoid future issues with new cops breaking the build.
- Fix some denial of service attacks via hash symbolization. (See #163 for details)
1.1.2 (2014-03-05)
- Don't constantize classes for model filters on initialization. This fixes a bug that made those filters dependent on load order.
1.1.1 (2014-03-04)
- Allow merging ActiveModel errors into ActiveInteraction errors with
ActiveInteraction::Errors#merge!
.
1.1.0 (2014-02-28)
- Only set instance variables for attributes with readers defined.
- Support
:only
and:except
options simultaneously withimport_filters
. Previously this raised anArgumentError
. - Support passing a single symbol to
:only
and:except
. Previously an Array was required. - Speed up many filters by caching class constants.
- Add support for callbacks around
execute
. - Allow callable defaults.
1.0.5 (2014-02-25)
- Rollback database changes when
compose
fails.
1.0.4 (2014-02-11)
- Add translations to the gem specification.
1.0.3 (2014-02-11)
- Fix a bug that caused invalid strings to be parsed as
nil
instead of raising an error whenTime.zone
was set. - Fix bug that prevented loading I18n translations.
1.0.2 (2014-02-07)
- Stop creating duplicate errors on subsequent calls to
valid?
.
1.0.1 (2014-02-04)
- Short circuit
valid?
after successfully running an interaction. - Fix a bug that prevented merging interpolated symbolic errors.
- Use
:invalid_type
instead of:invalid
as I18n key for type errors. - Fix a bug that skipped setting up accessors for imported filters.
1.0.0 (2014-01-21)
- Replace
Filters
with a hash. To iterate overFilter
objects, useInteraction.filters.values
. - Rename
Filter#has_default?
toFilter#default?
. - Add
respond_to_missing?
to complementmethod_missing
calls. - Add predicate methods for checking if an input was passed.
- When adding a filter that shares a name with an existing filter, it will now replace the existing one instead of adding a duplicate.
- Allow fetching filters by name.
- Allow import filters from another interaction with
import_filters
.
0.10.2 (2014-01-02)
- Fix a bug that marked Time instances as invalid if Time.zone was set.
0.10.1 (2013-12-20)
- Fix bug that prevented parsing strings as times when ActiveSupport was available.
0.10.0 (2013-12-19)
- Support casting "true" and "false" as booleans.
- Fix bug that allowed subclasses to mutate the filters on their superclasses.
0.9.1 (2013-12-17)
- Fix I18n deprecation warning.
- Raise
ArgumentError
when running an interaction with non-hash inputs. - For compatibility with
ActiveRecord::Errors
, support indifferent access ofActiveInteraction::Errors
. - Fix losing filters when using inheritance.
0.9.0 (2013-12-02)
- Add experimental composition implementation
(
ActiveInteraction::Base#compose
). - Remove
ActiveInteraction::Pipeline
.
0.8.0 (2013-11-14)
- Add ability to document interactions and filters.
0.7.0 (2013-11-14)
- Add ability to chain a series of interactions together with
ActiveInteraction::Pipeline
.
0.6.1 (2013-11-14)
- Re-release. Forgot to merge into master.
0.6.0 (2013-11-14)
- Error class now end with
Error
. - By default, strip unlisted keys from hashes. To retain the old behavior,
set
strip: false
on a hash filter. - Prevent specifying defaults (other than
nil
or{}
) on hash filters. Set defaults on the nested filters instead. - Add ability to introspect interactions with
filters
. - Fix bug that prevented listing multiple attributes in a hash filter.
- Allow getting all of the user-supplied inputs in an interaction with
inputs
. - Fix bug that prevented hash filters from being nested in array filters.
- Replace
allow_nil: true
withdefault: nil
. - Add a symbol filter.
- Allow adding symbolic errors with
errors.add_sym
and retrieving them witherrors.symbolic
.
0.5.0 (2013-10-16)
- Allow adding errors in
execute
method witherrors.add
. - Prevent manually setting the outcome's result.
0.4.0 (2013-08-15)
- Support i18n translations.
0.3.0 (2013-08-07)
- Give better error messages for nested attributes.
- Use default value when given an explicit
nil
. - Allow nested default values.
0.2.2 (2013-08-07)
- Fix support for
ActiveSupport::TimeWithZone
.
0.2.1 (2013-08-06)
- Fix setting a default value on more than one attribute at a time.
0.2.0 (2013-07-16)
- Wrap interactions in ActiveRecord transactions if they're available.
- Add option to strip string values, which is enabled by default.
- Add support for strptime format strings on Date, DateTime, and Time filters.
0.1.3 (2013-07-16)
- Fix bug that prevented
attr_accessor
s from working. - Handle unconfigured timezones.
- Use RDoc as YARD's Markdown provider instead of kramdown.
0.1.2 (2013-07-14)
execute
will now have the filtered version of the values passed torun
orrun!
as was intended.
0.1.1 (2013-07-13)
- Correct gemspec dependencies on activemodel.
0.1.0 (2013-07-12)
- Initial release.