Sha256: 934a32ae2815a6ba9ef9298195851f986ad4bbbec3d023f0e569e5cf1f02b3c5

Contents?: true

Size: 800 Bytes

Versions: 14

Compression:

Stored size: 800 Bytes

Contents

module EnjuCirculation
  module EnjuUserGroup
    def self.included(base)
      base.extend ClassMethods
    end

    module ClassMethods
      def enju_circulation_user_group_model
        has_many :user_group_has_checkout_types, :dependent => :destroy
        has_many :checkout_types, :through => :user_group_has_checkout_types, :order => :position
        has_many :lending_policies
        attr_accessible :user_group_has_checkout_types_attributes
        accepts_nested_attributes_for :user_group_has_checkout_types, :allow_destroy => true, :reject_if => :all_blank

        validates_numericality_of :number_of_day_to_notify_due_date,
          :number_of_day_to_notify_overdue,
          :number_of_time_to_notify_overdue,
          :greater_than_or_equal_to => 0
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
enju_circulation-0.1.0.pre38 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre37 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre36 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre35 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre34 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre33 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre32 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre31 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre30 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre29 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre28 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre27 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre26 lib/enju_circulation/user_group.rb
enju_circulation-0.1.0.pre25 lib/enju_circulation/user_group.rb