Method: Tiun::Model#tiun
- Defined in:
- lib/tiun/model.rb
#tiun ⇒ Object
tiun
sets up tiuner for the model. This exports corresponding record fields to default dashboard method, which loads the react component. When the model has been set up, the method returns the compiled data of the model.
Examples:
tiun
Model.tiun
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/tiun/model.rb', line 14 def tiun ## return self.instance_variable_get(:@tiun) if self.instance_variables.include?(:@tiun) ## self.instance_variable_set(:@tiun, { fields: _tiun_parse_model}) ## tiuns = self.class.instance_variables.include?(:@tiun) && self.class.instance_variable_get(:@tiuns) || [] ## tiuns << self ## self.class.instance_variable_set(:@tiuns, tiuns) # # belongs_to, has_many, has_one end |