enju_circulation 0.0.55 → 0.0.56
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/item_has_use_restrictions_controller.rb +2 -2
- data/app/models/item_has_use_restriction.rb +1 -2
- data/lib/enju_circulation/version.rb +1 -1
- data/spec/controllers/item_has_use_restrictions_controller_spec.rb +3 -3
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/segments_1 +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- metadata +2 -2
@@ -46,7 +46,7 @@ class ItemHasUseRestrictionsController < ApplicationController
|
|
46
46
|
# POST /item_has_use_restrictions.json
|
47
47
|
def create
|
48
48
|
@item_has_use_restriction = ItemHasUseRestriction.new(params[:item_has_use_restriction])
|
49
|
-
@item_has_use_restriction.assign_attributes(params[:item_has_use_restriction]
|
49
|
+
@item_has_use_restriction.assign_attributes(params[:item_has_use_restriction])
|
50
50
|
|
51
51
|
respond_to do |format|
|
52
52
|
if @item_has_use_restriction.save
|
@@ -63,7 +63,7 @@ class ItemHasUseRestrictionsController < ApplicationController
|
|
63
63
|
# PUT /item_has_use_restrictions/1
|
64
64
|
# PUT /item_has_use_restrictions/1.json
|
65
65
|
def update
|
66
|
-
@item_has_use_restriction.assign_attributes(params[:item_has_use_restriction]
|
66
|
+
@item_has_use_restriction.assign_attributes(params[:item_has_use_restriction])
|
67
67
|
respond_to do |format|
|
68
68
|
if @item_has_use_restriction.save
|
69
69
|
format.html { redirect_to @item_has_use_restriction, :notice => t('controller.successfully_updated', :model => t('activerecord.models.item_has_use_restriction')) }
|
@@ -1,6 +1,5 @@
|
|
1
1
|
class ItemHasUseRestriction < ActiveRecord::Base
|
2
|
-
attr_accessible
|
3
|
-
attr_accessible :item_id, :use_restriction_id, :as => :admin
|
2
|
+
attr_accessible :item_id, :use_restriction_id
|
4
3
|
belongs_to :item, :validate => true
|
5
4
|
belongs_to :use_restriction, :validate => true
|
6
5
|
accepts_nested_attributes_for :use_restriction
|
@@ -211,7 +211,7 @@ describe ItemHasUseRestrictionsController do
|
|
211
211
|
describe "with valid params" do
|
212
212
|
it "assigns a newly created item_has_use_restriction as @item_has_use_restriction" do
|
213
213
|
post :create, :item_has_use_restriction => @attrs
|
214
|
-
assigns(:item_has_use_restriction).
|
214
|
+
assigns(:item_has_use_restriction).should be_valid
|
215
215
|
end
|
216
216
|
|
217
217
|
it "should be forbidden" do
|
@@ -239,7 +239,7 @@ describe ItemHasUseRestrictionsController do
|
|
239
239
|
describe "with valid params" do
|
240
240
|
it "assigns a newly created item_has_use_restriction as @item_has_use_restriction" do
|
241
241
|
post :create, :item_has_use_restriction => @attrs
|
242
|
-
assigns(:item_has_use_restriction).
|
242
|
+
assigns(:item_has_use_restriction).should be_valid
|
243
243
|
end
|
244
244
|
|
245
245
|
it "should be forbidden" do
|
@@ -265,7 +265,7 @@ describe ItemHasUseRestrictionsController do
|
|
265
265
|
describe "with valid params" do
|
266
266
|
it "assigns a newly created item_has_use_restriction as @item_has_use_restriction" do
|
267
267
|
post :create, :item_has_use_restriction => @attrs
|
268
|
-
assigns(:item_has_use_restriction).
|
268
|
+
assigns(:item_has_use_restriction).should be_valid
|
269
269
|
end
|
270
270
|
|
271
271
|
it "should be forbidden" do
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
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.56
|
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-06-
|
12
|
+
date: 2012-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|