Sha256: 93848968dbd110cb7f46cafcd609a5072161e087be90ee9f0ba456723f4d8e3d

Contents?: true

Size: 804 Bytes

Versions: 1

Compression:

Stored size: 804 Bytes

Contents

require "enju_subject/engine"
require "enju_subject/master_model"
require "enju_subject/expire_editable_fragment"

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)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
enju_subject-0.0.15 lib/enju_subject.rb