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.
@@ -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], :as => :admin)
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], :as => :admin)
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
@@ -1,3 +1,3 @@
1
1
  module EnjuCirculation
2
- VERSION = "0.0.55"
2
+ VERSION = "0.0.56"
3
3
  end
@@ -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).should_not be_valid
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).should_not be_valid
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).should_not be_valid
268
+ assigns(:item_has_use_restriction).should be_valid
269
269
  end
270
270
 
271
271
  it "should be forbidden" do
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.55
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-10 00:00:00.000000000 Z
12
+ date: 2012-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails