Skip to content

Commit

Permalink
#61 verifying that story is working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaHany94 committed May 1, 2015
1 parent f14ba02 commit 64b0e84
Show file tree
Hide file tree
Showing 7 changed files with 1,071 additions and 60 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ gem 'redactor-rails'
gem 'carrierwave'
gem 'mini_magick'
gem 'cancan'
gem 'tzinfo-data'
gem 'coffee-script-source', '1.8.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

Expand Down
68 changes: 9 additions & 59 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,50 +1,3 @@
GIT
remote: git://github.com/rspec/rspec-core.git
revision: ee718e07074bb169c00d213ae5b075b8f86e8b56
branch: master
specs:
rspec-core (3.3.0.pre)
rspec-support (= 3.3.0.pre)

GIT
remote: git://github.com/rspec/rspec-expectations.git
revision: f0b79d1e58bcc209191bfc99a04211dd38718955
branch: master
specs:
rspec-expectations (3.3.0.pre)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (= 3.3.0.pre)

GIT
remote: git://github.com/rspec/rspec-mocks.git
revision: 838fc710797d15450ec992138bcce2f5e0658316
branch: master
specs:
rspec-mocks (3.3.0.pre)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (= 3.3.0.pre)

GIT
remote: git://github.com/rspec/rspec-rails.git
revision: fba0669b86d2d1c65b3efc7b14703046cbbe200e
branch: master
specs:
rspec-rails (3.3.0.pre)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
rspec-core (= 3.3.0.pre)
rspec-expectations (= 3.3.0.pre)
rspec-mocks (= 3.3.0.pre)
rspec-support (= 3.3.0.pre)

GIT
remote: git://github.com/rspec/rspec-support.git
revision: ad758245d098c24b9fd4bd0bb7a4054e66b574c2
branch: master
specs:
rspec-support (3.3.0.pre)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -116,19 +69,18 @@ GEM
diff-lcs (1.2.5)
docile (1.1.5)
erubis (2.7.0)
execjs (2.4.0)
execjs (2.5.2)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
font-awesome-rails (4.3.0.0)
railties (>= 3.2, < 5.0)
globalid (0.3.3)
globalid (0.3.5)
activesupport (>= 4.1.0)
hike (1.2.3)
i18n (0.7.0)
jbuilder (2.2.12)
jbuilder (2.2.13)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (4.0.3)
Expand All @@ -141,8 +93,9 @@ GEM
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.4.3)
mini_magick (4.2.3)
mini_portile (0.6.2)
minitest (5.5.1)
minitest (5.6.0)
multi_json (1.11.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
Expand Down Expand Up @@ -217,13 +170,9 @@ GEM
multi_json (~> 1.0)
simplecov-html (~> 0.9.0)
simplecov-html (0.9.0)
slop (3.6.0)
spring (1.3.3)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
spring (1.3.4)
sprockets (3.0.1)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.4)
actionpack (>= 3.0)
activesupport (>= 3.0)
Expand All @@ -242,7 +191,7 @@ GEM
railties (~> 4.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
tzinfo-data (1.2015.2)
tzinfo-data (1.2015.3)
tzinfo (>= 1.0.0)
uglifier (2.7.1)
execjs (>= 0.3.0)
Expand Down Expand Up @@ -270,6 +219,7 @@ DEPENDENCIES
font-awesome-rails
jbuilder (~> 2.0)
jquery-rails
mini_magick
rails (= 4.2.0)
redactor-rails
rspec-rails (~> 3.0)
Expand Down
2 changes: 2 additions & 0 deletions app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ def initialize(user)
can :show, Comment
can :show, Reply
can :show, Magazine
can :join, Magazine

unless user.nil?
can :update, Article do |article|
article.user_id == user.id
Expand Down
Binary file modified db/development.sqlite3
Binary file not shown.
4 changes: 3 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20150407210738) do

create_table "articles", force: :cascade do |t|
t.text "title"
t.text "body"
Expand All @@ -25,7 +26,8 @@

create_table "collaboration_invitations", force: :cascade do |t|
t.integer "status"
t.integer "User_id"
t.integer "User1_id"
t.integer "User2_id"
t.integer "Magazine_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
Expand Down
Loading

0 comments on commit 64b0e84

Please sign in to comment.