Method: FlexColumns::Definition::FieldSet#include_fields_into
- Defined in:
- lib/flex_columns/definition/field_set.rb
#include_fields_into(dynamic_methods_module, association_name, target_class, options) ⇒ Object
Adds delegated methods, as appropriate for IncludeFlexColumns#include_flex_columns_from, to the given DynamicMethodsModule. association_name is the name of the method on the target class that, when called, will return the associated model object of the class on which this flex column is defined (i.e., the association name); target_class is the class into which the DynamicMethodsModule is included, so we can check to make sure we’re not clobbering methods that we really shouldn’t clobber, and options is any options passed along.
65 66 67 68 69 |
# File 'lib/flex_columns/definition/field_set.rb', line 65 def include_fields_into(dynamic_methods_module, association_name, target_class, ) each_field do |field_definition| field_definition.add_methods_to_included_class!(dynamic_methods_module, association_name, target_class, ) end end |