enju_circulation 0.0.33 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/app/models/reserve.rb +4 -1
- data/lib/enju_circulation/version.rb +1 -1
- data/spec/dummy/app/models/item.rb +1 -3
- data/spec/dummy/config/initializers/devise.rb +0 -4
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/manifestations.yml +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
data/app/models/reserve.rb
CHANGED
@@ -19,7 +19,6 @@ class Reserve < ActiveRecord::Base
|
|
19
19
|
belongs_to :manifestation, :validate => true
|
20
20
|
belongs_to :librarian, :class_name => 'User', :validate => true
|
21
21
|
belongs_to :item, :validate => true
|
22
|
-
has_one :inter_library_loan
|
23
22
|
belongs_to :request_status_type
|
24
23
|
|
25
24
|
validates_associated :user, :librarian, :item, :request_status_type, :manifestation
|
@@ -247,6 +246,10 @@ class Reserve < ActiveRecord::Base
|
|
247
246
|
def checkout
|
248
247
|
self.update_attributes!({:request_status_type => RequestStatusType.where(:name => 'Available For Pickup').first, :checked_out_at => Time.zone.now})
|
249
248
|
end
|
249
|
+
|
250
|
+
if defined?(EnjuInterLibraryLoan)
|
251
|
+
has_one :inter_library_loan
|
252
|
+
end
|
250
253
|
end
|
251
254
|
|
252
255
|
# == Schema Information
|
@@ -61,15 +61,13 @@ class Item < ActiveRecord::Base
|
|
61
61
|
'User Signature Required',
|
62
62
|
'Limited Circulation, Normal Loan Period'
|
63
63
|
]
|
64
|
-
scope :for_checkout, includes(:circulation_status, :use_restriction)
|
65
|
-
.where(
|
64
|
+
scope :for_checkout, includes(:circulation_status, :use_restriction).where(
|
66
65
|
'circulation_statuses.name' => FOR_CHECKOUT_CIRCULATION_STATUS,
|
67
66
|
'use_restrictions.name' => FOR_CHECKOUT_USE_RESTRICTION
|
68
67
|
).where('item_identifier IS NOT NULL')
|
69
68
|
scope :removed, includes(:circulation_status).where('circulation_statuses.name' => 'Removed')
|
70
69
|
has_many :checkouts
|
71
70
|
has_many :reserves
|
72
|
-
has_many :reserved_patrons, :through => :reserves, :class_name => 'Patron'
|
73
71
|
has_many :checked_items, :dependent => :destroy
|
74
72
|
has_many :baskets, :through => :checked_items
|
75
73
|
belongs_to :circulation_status, :validate => true
|
@@ -92,10 +92,6 @@ Devise.setup do |config|
|
|
92
92
|
# If true, extends the user's remember period when remembered via cookie.
|
93
93
|
# config.extend_remember_period = false
|
94
94
|
|
95
|
-
# If true, uses the password salt as remember token. This should be turned
|
96
|
-
# to false if you are not using database authenticatable.
|
97
|
-
config.use_salt_as_remember_token = true
|
98
|
-
|
99
95
|
# Options to be passed to the created cookie. For instance, you can set
|
100
96
|
# :secure => true in order to force SSL only cookies.
|
101
97
|
# config.cookie_options = {}
|
Binary file
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_circulation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.34
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|