OSDN Git Service

Made fixes suggested by @randx in pull request
authorAngus MacArthur <amacarthur@blackberry.com>
Thu, 2 May 2013 20:27:40 +0000 (16:27 -0400)
committerAngus MacArthur <amacarthur@blackberry.com>
Thu, 2 May 2013 20:41:33 +0000 (16:41 -0400)
See https://github.com/gitlabhq/gitlabhq/pull/3597#discussion-diff-4014638

app/models/ability.rb
db/migrate/20130319214458_create_forked_project_links.rb

index 0c5fbc2..eb7f89d 100644 (file)
@@ -60,15 +60,16 @@ class Ability
         :read_note,
         :write_project,
         :write_issue,
-        :write_note,
-        :fork_project
+        :write_note
       ]
     end
 
     def project_report_rules
       project_guest_rules + [
         :download_code,
-        :write_snippet
+        :write_snippet,
+        :fork_project
+
       ]
     end
 
index 55aad12..f91afc2 100644 (file)
@@ -1,11 +1,11 @@
 class CreateForkedProjectLinks < ActiveRecord::Migration
   def change
     create_table :forked_project_links do |t|
-      t.integer :forked_to_project_id, :null => false
-      t.integer :forked_from_project_id, :null => false
+      t.integer :forked_to_project_id, null: false
+      t.integer :forked_from_project_id, null: false
 
       t.timestamps
     end
-    add_index :forked_project_links, :forked_to_project_id, :unique => true
+    add_index :forked_project_links, :forked_to_project_id, unique: true
   end
 end