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.1 lib/enju_subject.rb
enju_subject-0.1.0 lib/enju_subject.rb
enju_subject-0.1.0.pre34 lib/enju_subject.rb
enju_subject-0.1.0.pre33 lib/enju_subject.rb
enju_subject-0.1.0.pre32 lib/enju_subject.rb
enju_subject-0.1.0.pre31 lib/enju_subject.rb
enju_subject-0.1.0.pre30 lib/enju_subject.rb
enju_subject-0.1.0.pre29 lib/enju_subject.rb
enju_subject-0.1.0.pre28 lib/enju_subject.rb
enju_subject-0.1.0.pre27 lib/enju_subject.rb
enju_subject-0.1.0.pre26 lib/enju_subject.rb
enju_subject-0.1.0.pre25 lib/enju_subject.rb
enju_trunk_subject-1.0.4 lib/enju_subject.rb
enju_subject-0.1.0.pre24 lib/enju_subject.rb
enju_subject-0.1.0.pre23 lib/enju_subject.rb
enju_subject-0.1.0.pre22 lib/enju_subject.rb
enju_subject-0.1.0.pre21 lib/enju_subject.rb
enju_subject-0.1.0.pre20 lib/enju_subject.rb
enju_subject-0.1.0.pre19 lib/enju_subject.rb
enju_subject-0.1.0.pre18 lib/enju_subject.rb