Class: Knj::Translations::Translation

Inherits:
Datarow show all
Defined in:
lib/knj/translations.rb

Instance Attribute Summary

Attributes inherited from Datarow

#data, #db, #ob

Class Method Summary collapse

Methods inherited from Datarow

#[], #[]=, classname, classname=, columns_sqlhelper_args, define_bool_methods, define_date_methods, define_numeric_methods, define_text_methods, define_time_methods, define_translation_methods, #deleted?, depending_data, #destroy, #each, #has_key?, has_many, has_one, has_translation, #id, #initialize, #is_knj?, is_nullstamp?, joined_tables, #key?, list, list_helper, load_columns, #name, #name_html, #reload, required_data, #table, table, table=, translations, #update

Constructor Details

This class inherits a constructor from Knj::Datarow

Class Method Details

.add(d) ⇒ Object



126
127
128
129
130
131
132
# File 'lib/knj/translations.rb', line 126

def self.add(d)
  if d.data[:object]
    d.data[:object_class] = d.data[:object].class.name
    d.data[:object_id] = d.data[:object].id
    d.data.delete(:object)
  end
end