Sha256: da457fad5af55a64a76d410fa6696900788146c6106199fbf8e47b9b98c2e1a5

Contents?: true

Size: 821 Bytes

Versions: 33

Compression:

Stored size: 821 Bytes

Contents

require "enju_subject/engine"
require "enju_subject/manifestation"

module EnjuSubject
  def self.included(base)
    base.extend(ClassMethods)
  end

  module ClassMethods
    def enju_subject
      include EnjuSubject::InstanceMethods
    end
  end

  module InstanceMethods
    private

    def get_subject_heading_type
      @subject_heading_type = SubjectHeadingType.find(params[:subject_heading_type_id]) if params[:subject_heading_type_id]
    end

    def get_subject
      @subject = Subject.find(params[:subject_id]) if params[:subject_id]
    end

    def get_classification
      @classification = Classification.find(params[:classification_id]) if params[:classification_id]
    end
  end
end

ActionController::Base.send :include, EnjuSubject
ActiveRecord::Base.send :include, EnjuSubject::EnjuManifestation

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
enju_subject-0.1.0.pre17 lib/enju_subject.rb
enju_subject-0.1.0.pre16 lib/enju_subject.rb
enju_subject-0.1.0.pre15 lib/enju_subject.rb
enju_subject-0.1.0.pre14 lib/enju_subject.rb
enju_subject-0.1.0.pre13 lib/enju_subject.rb
enju_subject-0.1.0.pre12 lib/enju_subject.rb
enju_subject-0.1.0.pre11 lib/enju_subject.rb
enju_subject-0.1.0.pre10 lib/enju_subject.rb
enju_subject-0.1.0.pre9 lib/enju_subject.rb
enju_subject-0.1.0.pre8 lib/enju_subject.rb
enju_subject-0.1.0.pre7 lib/enju_subject.rb
enju_subject-0.1.0.pre6 lib/enju_subject.rb
enju_subject-0.1.0.pre5 lib/enju_subject.rb