- Replaced
after_
callbacks withbefore_
callbacks and setautosave: true
by default. #341 by Andrew Volozhanin - Add RequestStore to make Globalize thread-safe again #420
- Join the translations table when ordering by translated attributes (globalize#447). (thanks Thomas Maas & Michal Cichra).
- Add
unique
towith_translation
to prevent duplicates if fallbacks are defined and the queried locale is not the fallback language. #489 by krisdigital
- Don't touch table when model is loaded. #412
- Remove handling for locale attribute on parent model #411 by awesome Tekin Suleyman.
- Added support for Rails 4.2, but removed support for every previous version of Rails. This is a backward incompatible change, thus the version is now 5.0.0. (thanks Nico Ritsche and others). #396.
- Fixes a problem where after dup the dup'd model and the original model shared a translation instance, which means that if you mutate a translated field on the dup and save it, the original becomes a clone of the dup. #352.
- Deprecated
with_required_attributes
,required_attributes
, andrequired_translated_attributes
.with_translations
no longer invokeswith_required_attributes
. #355. - Removed all usages of
Thread.local
. #374. (thanks Hubert Lee). - Added
available_locales
method. This duplicatestranslated_locales
method, but it doesn't use a separateDISTINCT
query. #339. (thanks Andrew Volozhanin).
- Use
reflections
class method soensure_foreign_key_for
works in AR >= 4.1.2, fixes #353. - Set
touch:true
onbelongs_to
for the globalized model, fixes #330 (thanks shlensky). - Accept optional arguments passed to
where_values_hash
, fixes #354 (thanks felixbuenemann).
- Fix bug where
with_translations
only works if called afterwhere
in relation chain, fixes #343. - Use
preload
andjoins
instead ofincludes
inwith_translations
, fixes #329 (thanks Andrew Volozhanin). - Update
database_cleaner
dependency to 1.2.0. - Support use of
first
/take
/last
with limit on queries with translated attributes, fixes #322 (thanks prusswan). - Ensure that options are always extracted from
attr_names
inGlobalize::ActiveRecord::ActMacro#translates
, PR #319 (thanks Marek).
- Extract all versioning-related code to separate globalize-versioning gem.
- Fix issue where globalize breaks has_many through when model called with
where
(thanks Paul McMahon). - Modify dup so that translations are copied, and remove custom clone code to conform to Rails/AR semantics (thanks Paul McMahon).
- Add this changelog.
- Add contributing guidelines.
- Group options into more structured methods in act_macro.rb.
- Remove dynamic finder code from globalize3, no longer used in AR4.
- Get hash of translated attributes by calling attribute on model, not translation.
- Define translation readers/writers in separate methods.
- Test against AR 4.1 and AR 4.0.
- Switch to minitest-reporters for colouring output from minitest.
- Remove find_or_instantiator_by_attributes which is no longer used in AR4.
- Set I18n.available_locales in tests to avoid deprecation message.
- Reorganize specs into describe blocks to clarify object of specs.
- Move ActiveRecord::Relation#where_values_hash patch into globalize relation class to avoid monkeypatching.
- Add Code Climate Score (thanks BrandonMathis).
- Query using Globalize.fallbacks rather than locale only when fetching a record (thanks @huoxito).
- Use a module (QueryMethods) rather than a class for overriding functionality of ActiveRecord::Relation.
- Use ActiveRecord::Relation#extending! to extend ActiveRecord::Base#relation with QueryMethods, works with associations as well.
- Add license to gemspec.
- Update references to ActiveRecord 3 -> ActiveRecord.
- Replace references to globalize3 with globalize and remove references to ActiveRecord 3.x.
- Document
3-0-stable
branch in readme. - Convert test syntax to MiniTest::Spec.
- Extract easy accessors functionality, moved to new globalize-accessors gem.
- Check that
first
is not nil before reloading translations, fixes #282. - Duplicate arguments in query finders before modifying them, fixes #284.
- Add test for
find_or_create_by
with translated attribute.
- Initial release of Rails 4-compatible gem.
- Backport scope support on uniqueness validation from 4.0, drop support for ActiveRecord < 3.1, fixes #324.
- Extract all versioning-related code to separate globalize-versioning gem.
- Ensure that foreign key is always set when saving translations (thanks Andrew Feng).
- Patch I18n to add back I18n.interpolate after it was removed (accidentally?) in v0.5.2 (see svenfuchs/i18n#232. Hopefully this patch will be temporary.
- Explicitly test compatibility with FriendlyId to avoid issues like #306.
- Only override ActiveRecord::Base#relation to patch where_values_hash if using AR >= 3.2.1.
- Alias
ActiveRecord::Base#relation
and include query method overrides as module, fixes #306 and norman/friendly_id#485.
- Move
ActiveRecord::Relation#where_values_hash
patch to Globalize-specific Relation class that inherits fromActiveRecord::Relation
to fix compatibility issue with Squeel (#288). - Use FriendlyId pattern for overriding
ActiveRecord::Base#relation
to avoid conflict. - Remove
:null => false
condition on reference to parent model in translation table migration, partial fix for refinery/refinerycms#2450.
- Initial release with new version numbering.