Module: WorksCited::Mixins::HasWorksCited
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/works_cited/mixins/has_works_cited.rb
Overview
HasWorksCited Mixin
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Instance Method Summary collapse
-
#has_works_cited(_options = {}) ⇒ Object
rubocop:disable Naming/PredicateName.
Instance Method Details
#has_works_cited(_options = {}) ⇒ Object
rubocop:disable Naming/PredicateName
10 11 12 13 14 15 16 |
# File 'lib/works_cited/mixins/has_works_cited.rb', line 10 def has_works_cited( = {}) extend ClassMethods include InstanceMethods has_many :works_cited_citations, as: :record, class_name: 'WorksCited::Citation' accepts_nested_attributes_for :works_cited_citations, reject_if: :all_blank, allow_destroy: true end |