metadata - ActiveRecord::Reflections Adding personal meta data to Reflection -


hi have following model

class tale < activerecord::base #todo model should created automatically based on structure  attr_accessor :sex, :family, :me  after_initialize @sex = nil @family = [] @me = [] end    before_create self.joined = false true end   has_many :tale_culture_joins  has_many :tale_purpose_joins  has_many :tale_book_joins  has_many :tale_keyword_joins  has_many :tale_character_joins  has_many :tale_moral_joins  has_many :tale_event_joins   #todo grouping models unique single identifier can searched tag. these associations searching  #todo need fix on query uniq results returned ... can added @runtime has_many :cultures, through: :tale_culture_joins, dependent: :destroy has_many :purposes, through: :tale_purpose_joins, dependent: :destroy has_many :books, through: :tale_book_joins, dependent: :destroy has_many :keywords, through: :tale_keyword_joins, dependent: :destroy has_many :characters, through: :tale_character_joins, dependent: :destroy has_many :morals, through: :tale_moral_joins, dependent: :destroy has_many :values, through: :morals  has_many :events, through: :tale_event_joins, dependent: :destroy  has_many :hyperlinks has_many :content_types, through: :hyperlinks  end 

some of reflections used , post data form. can seen values related tales through morals. not storing in tale_value join table.

i perform data entry , search functions. want define reflections search. how can add tag | meta data | key reflection can later check on

for example on has_many :values, through: : morals add option :searchable .. me when building search interface want query reflections have searchable tag.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -