- Fix destroying empty translations in AR table backend (#307). Thanks Raúl Rodríguez!
- Load column_type when building node (#301)
- Use references to define polymorphic associations in generator migrations (#292)
- Handle untranslated scopes in AR query module (#288)
- Default ActiveRecord Table/KeyValue backends to OUTER JOIN (#277)
- Default Sequel Table/KeyValue backends to OUTER JOIN (#279)
- Do not skip generator on
:revoke
behavior (#274). Thanks mauriciopasquier! - Bump i18n dependency to allow versions up to 2.0 (#280)
- Use
references
andforeign_key
in Table migration generator (#282 and #283) Thanks omitter!
- Support order clause on translated queries (ActiveRecord) (#261)
- Restructure Sequel querying into plugin (#255, #267, #268)
- Default locale to Mobility.locale in apply_scope (#263)
- Require Ruby version 2.3.7 or greater (#242)
- Only return unique names from mobility_attributes (#256)
- Handle locales with multiple dashes in locale accessors, or raise ArgumentError for invalid format (#253)
- Fix uniqueness on Mobility model with no translated attributes (#252)
- Normalize locale in table aliases (#246)
- Revert unscoping in uniqueness validator (#244)
- Restructure querying into plugin (ActiveRecord only) (#216, #225, #222)
- Support querying on multiple locales at once (#232)
- Allow passing locale to query methods (#233)
- Support matches and lower predicate methods (#235)
- Implement case-insensitive uniqueness validation (#236, #237)
- Support equality predicates between jsonb nodes (#240)
- Prefer -> operator when comparing jsonb columns (#241)
- Define options on subclassed backend class (#218)
- Add column_affix when configuring options (#217)
- Use module_eval to define locale_accessors (#219)
- Improve performance of getters/setters (#220)
- Do not include Default plugin by default (#223)
- Add specific attribute types to basic usage example (#228). Thanks thatguysimon!
- Remove Mobility::Interface (#229)
- Freeze attributes array (#230)
- Add column_prefix/column_suffix options to hash backends (#200 and #201)
- Require specifying type for KeyValue backends (#200)
- Remove table backend index on foreign key alone (#198)
- Test/cleanup index name truncation in backend generators (#197)
- Improve translations generators (#196)
- Enforce null: false constraint on columns consistently (#205)
- Add extension to find translations in a locale for Table backend (#202)
- Ignore non-arel nodes in joins_values (#206)
- Collapse duplicates in array-valued query hash (#207)
- Remove unneeded anonymous module in backend resetters (#213)
- Make constants private (#214)
- Use IN when querying on array values with PG backends (#209)
- Remove some deprecated methods (#215)
- Explicitly implement matches/has_locale methods everywhere (#194)
- Refactor Mobility::Backends::AR::QueryMethods using MobilityWhereChain module (#193)
- Add missing documentation (#192)
- Fix issues with Dirty plugin in ActiveRecord 5.2.0.rc2 (#166)
- Support PostgreSQL json column format as Json backend and dynamically in Container backend (#182 and #184, respectively)
- Fall through to
I18n.fallbacks
when defined (#180) - Improve comments in Rails initializer (#186)
- Use pragma comments to freeze strings everywhere (#177)
- Add missing require in container backend (#174)
- Update dependencies to support i18n v1.0
- Use
locale: true
instead offallback: false
in dirty plugin (a52998)
- Refactor find_by for translated attributes (#160)
- Use element operator instead of contains for jsonb querying (#159)
- Add new jsonb Container backend (#157)
- Define attributes accessors with eval (#152)
- Rename
default_fallbacks
tonew_fallbacks
/fallbacks_generator=
(#148) - Warn user if
case_sensitive
option is passed to ActiveRecord uniqueness validator (#146) - Handle array of values to translated attribute query (#128)
- Use module builder instance to define shared methods in closure (#130)
- Query on translated json value with Sequel ORM (#155)
- Refactor pg query methods (#129)
- Reduce object allocations (#156)
- Make
_read_attribute
public in AR Dirty plugin (#150)
- Make Default plugin handle Procs more gracefully (#137)
- Show deprecation warning if keyword options passed to Default plugin (#147)
- Move
translated_attribute_names
toMobility::ActiveRecord
(#132) - Refactor AR pg query methods (#129)
- Fix issue with querying on translated attributes with Sequel Table backend (#121)
- Disable AR::Dirty method overrides for AR >= 5.2 (and < 5.1 for
has_attribute
) (#120)
dup
support for table backend (#84). Thanks @pwim!- Disable fallbacks when using locale/fallthrough accessors (#86, #87, #88, #89)
- Convert AttributeMethods to plugin (#102)
- Ensure
cache_key
is invalidated when updating translations (#104) Thanks @pwim! - Update dependency versions (#107)
- Fix AM/AR Dirty plugin issues with Rails 5.2 (#116)
- Support new AR::Dirty methods (#111)
- Use
public_send
in LocaleAccessors plugin (#117) - Deprecate setting value of
default_options
directly (#113)
- Set default values in Sequel Jsonb/Hstore backends (#80)
- Fix missing requires in
Mobility::Backends::Sequel::PgHash
(22df29) - Only require Rails generators if both Rails and ActiveRecord are loaded (03a9ff)
See overview of the changes in this blog post.
- Mobility.default_options (#50)
- Re-organized options under Plugins namespace (#62)
- Backends are now Enumerable (#71)
- Replace
autoload
byrequire
(#65) - Remove mobility/core_ext and replace with
Mobility::Util
(#60) - New "default" plugin which sets a default value or proc for an attribute: (#49)
- Add
super
option (#62) - Rename default associations for KeyValue and Table backends (#59 and #66)
- Refactor cache code (#57)
- Gem is now signed (#73)
- Minimum Ruby version: 2.2.7
- Fix location of Rails generators to work with plugins (#56)
- Partial support for AR 4.2 (#46)
- Fix issues with Sequel >= 4.46.0 (#47)
- Include anonymous modules instead of defining methods directly on class (049a5f, d8fe42, 9cc3d0)
- Fix deprecation warnings when using ActiveRecord 5.1 (#44)
- Fix STI issues (#43)
- Fix deprecation warnings using class_name (#32)
- Avoid using respond_to? on relation, to fix ImmutableRelation exception (d3e974).
- Reset memoized backends when duplicating (#26)
- Allow passing
cache: false
to disable cache in getter (b4858a) and setter (6085d7) - Rename
configure!
method toconfigure
(4e35c54) - Make query scope method configurable (#22)
- Do not memoize scopes/datasets (#24)
- Extract presence filter into
Mobility::Backend::Presence
class (7d654, e42ee6) - Get suffix methods from ActiveModel (for compatibility with Rails 4.2) (9685d1)
- Destroy all translations after model is destroyed (KeyValue backend) (#15)
- Refactor to remove
mobility_get
,mobility_set
.mobility_present?
models from model class (#16)
- Add backend-specific translations generator (
rails generate mobility:translations
) (9dbe4d, 583a51, 6b9605, e2e807) - Fix bug with combination of Column backend and fallthrough accessors (212f07)
- Raise
InvalidLocale
when getting a locale that is not available (d4f0ee) - Pass options to backend write from setter (5d224f)
- Correctly include
FallthroughAccessors
module in module, not backend (d9471d) - Handle presence methods in
FallthroughAccessors
(66f630)
(yanked)
(yanked)
- Allow passing fallback locale or locales to getter method (#9)
- Add missing indices on key-value string/text translation tables (1e00e0, 574172)
- Return accessor locales instead of Proc from default_accessor_locales (825f75)
- Fix support for locales in dirty modules (0b40d6)
- Add FallthroughAccessors for use in dirty modules (#4)
- Only raise InvalidLocale exception if I18n.enforce_available_locales is true (979c36)
- Add
accessor_method
to default initializer (d4a9da) - Include AR version in generated migrations (ac3dfb)
- Add
untranslated_attributes
method (50e97f) - Do not require
active_support/core_ext/nil
(39e245) - Handle false values correctly when getting and setting (bdf6f1)
- Use proc to define accessor locales from
I18n.available_locales
(3cd786) - Do not mark attribute as changed if value is the same (fixed in #2)
- Pass on any args to original reload method when overriding (fixed in #3)
- Fix configuration reload issue (#1, fixed in 478b66)
- Code refactoring/cleanup (e4dcc7, 64f434, 8df2bb, 326a09)
- Allow using Sequel
plugin
to include Mobility in model (b0db7c)
- Add homepage to gemspec
- Pass backend class as context to
translates
(adf93e)