diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-05-19 17:48:42 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-05-21 22:34:36 +0200 |
commit | 9f617e5093d928c99b9e87a1574195d8a8c8612c (patch) | |
tree | 1918f8815e91e705494b03b2491a341d46971cef /db | |
parent | User has and belongs to many categories (diff) | |
download | recruiting-webapp-9f617e5093d928c99b9e87a1574195d8a8c8612c.tar.gz recruiting-webapp-9f617e5093d928c99b9e87a1574195d8a8c8612c.tar.bz2 recruiting-webapp-9f617e5093d928c99b9e87a1574195d8a8c8612c.zip |
Permissions for answers
And tests for permissions them. Any logged in user can create, update,
view, delete answers [s]he owns. No one can change answers someone else
owns. Recruiters can view all answers.
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/db/schema.rb b/db/schema.rb index 04259b8..78fd30d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,15 +9,17 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20100520194927) do +ActiveRecord::Schema.define(:version => 20100520194946) do create_table "answers", :force => true do |t| t.text "content" t.datetime "created_at" t.datetime "updated_at" t.integer "question_id" + t.integer "owner_id" end + add_index "answers", ["owner_id"], :name => "index_answers_on_owner_id" add_index "answers", ["question_id"], :name => "index_answers_on_question_id" create_table "question_categories", :force => true do |t| |