Module: AssignsHasManyThroughRelations::ControllerConcern
- Defined in:
- lib/assigns_has_many_through_relations/controller_concern.rb
Instance Method Summary collapse
- #assigns_has_many_relationships_with(left_relation, right_relation) ⇒ Object
- #join_name ⇒ Object
- #left_relation_class ⇒ Object
- #left_relation_class_name ⇒ Object
- #left_relation_param_name ⇒ Object
- #right_relation_class ⇒ Object
Instance Method Details
#assigns_has_many_relationships_with(left_relation, right_relation) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/assigns_has_many_through_relations/controller_concern.rb', line 3 def assigns_has_many_relationships_with(left_relation, right_relation) @left_relation_param_name = left_relation @left_relation_class = left_relation.to_s.camelize.constantize @left_relation_class_name = @left_relation_class.name @right_relation_class = right_relation.to_s.camelize.constantize @join_name = AssignsHasManyThroughRelations.join_name_for left_relation, right_relation include AssignsHasManyThroughRelations::ControllerInstanceMethods helper_method :left_relation_class_name, :join_name send AHMTR.auth_filter if AHMTR.auth_filter end |
#join_name ⇒ Object
20 |
# File 'lib/assigns_has_many_through_relations/controller_concern.rb', line 20 def join_name; @join_name end |
#left_relation_class ⇒ Object
17 |
# File 'lib/assigns_has_many_through_relations/controller_concern.rb', line 17 def left_relation_class; @left_relation_class end |
#left_relation_class_name ⇒ Object
18 |
# File 'lib/assigns_has_many_through_relations/controller_concern.rb', line 18 def left_relation_class_name; @left_relation_class_name end |
#left_relation_param_name ⇒ Object
16 |
# File 'lib/assigns_has_many_through_relations/controller_concern.rb', line 16 def left_relation_param_name; @left_relation_param_name end |
#right_relation_class ⇒ Object
19 |
# File 'lib/assigns_has_many_through_relations/controller_concern.rb', line 19 def right_relation_class; @right_relation_class end |