Sha256: 382aa5424850bc11fd05f4e26a3bc09d18c43ce1f90420e7be82b29e4b71a9c4
Contents?: true
Size: 1.01 KB
Versions: 4
Compression:
Stored size: 1.01 KB
Contents
module Binda module FieldGroupsHelper def get_form_field_group_url return structure_field_groups_path if action_name == 'new' return structure_field_group_path if action_name == 'edit' end def get_relationable_components field_setting if @instance.class.to_s == 'Binda::Component' Binda::Component.where( structure_id: Binda::Structure.where( id: field_setting.accepted_structure_ids )).where.not(id: @instance.id) elsif @instance.class.to_s == 'Binda::Board' Binda::Component.where( structure_id: Binda::Structure.where( id: field_setting.accepted_structure_ids )) end end def get_relationable_boards field_setting if @instance.class.to_s == 'Binda::Component' Binda::Board.where( structure_id: Binda::Structure.where( id: field_setting.accepted_structure_ids )) elsif @instance.class.to_s == 'Binda::Board' Binda::Board.where( structure_id: Binda::Structure.where( id: field_setting.accepted_structure_ids )).where.not(id: @instance.id) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems