summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 11:40:22 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 11:40:22 +0100
commitad33f4bbbdf204507e31b7d9ab2ed24b5f7bdcdd (patch)
treed004c2b6f4f1dfd9dcc5db465aa9f9e9ac98efd0
parent4194d7f689c3f70c9247e8006694cfcf667ebaf0 (diff)
parent962e07e58451f5d21cab9804191139be0f20189b (diff)
Merge branch 'ability_fix' into develop
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock4
-rw-r--r--app/controllers/users_controller.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/Gemfile b/Gemfile
index 6e020a2..9f0fe8e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,7 +4,7 @@ gem 'rails', '3.2.11'
gem 'bcrypt-ruby'
gem 'sqlite3'
gem 'mysql2'
-gem 'cancan'
+gem 'cancan', '1.6.7'
gem 'state_machine'
gem 'acts_as_list'
gem 'dalli' # memcached
diff --git a/Gemfile.lock b/Gemfile.lock
index d82d82f..e4deaeb 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -36,7 +36,7 @@ GEM
builder (3.0.4)
cache_digests (0.2.0)
actionpack (>= 3.2)
- cancan (1.6.8)
+ cancan (1.6.7)
carrierwave (0.8.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
@@ -183,7 +183,7 @@ DEPENDENCIES
bcrypt-ruby
breadcrumbs_on_rails
cache_digests
- cancan
+ cancan (= 1.6.7)
carrierwave
coffee-rails (~> 3.2.1)
compass-rails
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 454c26b..7af8e68 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -10,7 +10,7 @@ class UsersController < ApplicationController
end
def show
- @phone_books = PhoneBook.accessible_by( Ability.new( @user ) ).all
+ @phone_books = PhoneBook.accessible_by( Ability.new( @user ), :read )
end
def new