Class: Knj::Translations::Translation

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

Instance Attribute Summary

Attributes inherited from Datarow

#db, #ob

Class Method Summary collapse

Methods inherited from Datarow

#[], #[]=, #__object_unique_id__, autodelete_data, classname, classname=, columns_sqlhelper_args, #data, #deleted?, depending_data, #destroy, #each, has_many, has_one, has_translation, #id, #initialize, initialized?, #is_knj?, is_nullstamp?, joined_tables, #key?, list, list_helper, load_columns, #name, #name_html, ob, #reload, required_data, #should_reload, #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