You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Rails 3.0RC methods "class_name" was removed from ActiveRecord::Base. Globalize2 is broken because of that (method "translates" does not work). Here is my short workaround (I just copy-pasted implementation of removed class_method into globalize/active_record.rb file)
# file globalize2/lib/globalize/active_record.rb
# ...
# BEGIN OF PATCH
class_name = table_name[table_name_prefix.length..-(table_name_suffix.length + 1)].camelize
class_name = class_name.singularize if pluralize_table_names
# END OF PATCH
has_many :translations, :class_name => translation_class.name,
:foreign_key => class_name.foreign_key,
:dependent => :delete_all,
:extend => HasManyExtensions
# ...
The text was updated successfully, but these errors were encountered:
i will look at that today - see if nothing else is broken - thanks for looing into it. You can accelerate things by forking, applying changes, writing / running tests and send pull requests by the way ;) - underrated concept!
In Rails 3.0RC methods "class_name" was removed from ActiveRecord::Base. Globalize2 is broken because of that (method "translates" does not work). Here is my short workaround (I just copy-pasted implementation of removed class_method into globalize/active_record.rb file)
The text was updated successfully, but these errors were encountered: