Commit 9ffe5f7e
app/models/photo.rb
@@ -1,5 +1,5 @@
class Photo < ActiveRecord::Base
- attr_accessible :is_primary, :creation
+ attr_accessible :is_primary, :creation, :image
belongs_to :creation
validates :image, :presence => true
mount_uploader :image, PhotoUploader
db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20121002125009) do
+ActiveRecord::Schema.define(:version => 20121007153155) do
create_table "active_admin_comments", :force => true do |t|
t.integer "resource_id", :null => false
@@ -29,18 +29,18 @@ ActiveRecord::Schema.define(:version => 20121002125009) do
add_index "active_admin_comments", ["resource_type", "resource_id"], :name => "index_admin_notes_on_resource_type_and_resource_id"
create_table "admin_users", :force => true do |t|
- t.string "email", :default => "", :null => false
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
+ t.string "email", :default => "", :null => false
+ t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
- t.integer "sign_in_count", :default => 0
+ t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
add_index "admin_users", ["email"], :name => "index_admin_users_on_email", :unique => true
@@ -55,8 +55,8 @@ ActiveRecord::Schema.define(:version => 20121002125009) do
create_table "categories", :force => true do |t|
t.string "name"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "slug"
end
@@ -80,8 +80,8 @@ ActiveRecord::Schema.define(:version => 20121002125009) do
create_table "creations", :force => true do |t|
t.string "name"
t.text "story"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "user_id"
t.string "image"
t.boolean "is_restricted", :default => false, :null => false
@@ -93,11 +93,27 @@ ActiveRecord::Schema.define(:version => 20121002125009) do
t.integer "category_id"
end
+ create_table "delayed_jobs", :force => true do |t|
+ t.integer "priority", :default => 0
+ t.integer "attempts", :default => 0
+ t.text "handler"
+ t.text "last_error"
+ t.datetime "run_at"
+ t.datetime "locked_at"
+ t.datetime "failed_at"
+ t.string "locked_by"
+ t.string "queue"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
+
create_table "favorites", :force => true do |t|
t.integer "user_id"
t.integer "creation_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "interests", :force => true do |t|
@@ -109,8 +125,9 @@ ActiveRecord::Schema.define(:version => 20121002125009) do
create_table "photos", :force => true do |t|
t.integer "creation_id"
t.string "image"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.boolean "is_primary"
end
create_table "taggings", :force => true do |t|
@@ -143,18 +160,18 @@ ActiveRecord::Schema.define(:version => 20121002125009) do
end
create_table "users", :force => true do |t|
- t.string "email", :default => "", :null => false
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
+ t.string "email", :default => "", :null => false
+ t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
- t.integer "sign_in_count", :default => 0
+ t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "name"
t.string "website"
t.string "twitter"