Method: Elastictastic::ParentChild::ClassMethods#belongs_to
- Defined in:
- lib/elastictastic/parent_child.rb
#belongs_to(parent_name, options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/elastictastic/parent_child.rb', line 8 def belongs_to(parent_name, = {}) @parent_association = Association.new(parent_name, ) module_eval(" def \#{parent_name}\n _parent\n end\n RUBY\nend\n", __FILE__, __LINE__+1) |