Module: Attributable::Association::Target
- Included in:
- BudgetDivision, DataReleaseStudyType, FacultySponsor, Program, ProjectManager, ReferenceGenome, Study, StudyType
- Defined in:
- app/models/attributable/association.rb
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
5 6 7 8 9 10 |
# File 'app/models/attributable/association.rb', line 5 def self.extended(base) base.class_eval do include InstanceMethods scope :for_selection, -> { order(:name) } end end |
Instance Method Details
#default ⇒ Object
16 17 18 |
# File 'app/models/attributable/association.rb', line 16 def default nil end |
#for_select_association ⇒ Object
12 13 14 |
# File 'app/models/attributable/association.rb', line 12 def for_select_association for_selection.pluck(:name, :id) end |