Module: TranslatableRecords::Extensions::ActiveRecord::Base::ClassMethods
- Defined in:
- lib/translatable_records/extensions/active_record/base.rb
Instance Method Summary collapse
Instance Method Details
#translatable? ⇒ Boolean
9 10 11 |
# File 'lib/translatable_records/extensions/active_record/base.rb', line 9 def translatable? translations.any? end |
#translate(*attributes) ⇒ Object
17 18 19 20 |
# File 'lib/translatable_records/extensions/active_record/base.rb', line 17 def translate(*attributes) builder = Builder.new(self) builder.define attributes end |
#translations ⇒ Object
13 14 15 |
# File 'lib/translatable_records/extensions/active_record/base.rb', line 13 def translations @translations ||= [] end |