Permalink
Browse files

[FIX] ironing API

  • Loading branch information...
1 parent 25b8c32 commit 28b3011fcc80a326b94176b4aa2e3a6aa09df939 Elad Meidar committed Jun 11, 2014
Showing with 7 additions and 16 deletions.
  1. +4 −2 app/models/concerns/pet.rb
  2. +2 −1 app/models/concerns/product.rb
  3. +1 −13 db/schema.rb
@@ -1,7 +1,9 @@
class Pet
- attr_accessor :name, :creature
+ attr_accessor :name, :kind, :age
def initialize
- self.creature = Faker::Team.creature.singularize
+ self.name = Faker::Name.first_name
+ self.kind = Faker::Team.creature.singularize
+ self.age = rand(14) + 1
end
end
@@ -1,10 +1,11 @@
class Product
- attr_accessor :color, :price, :name, :department
+ attr_accessor :color, :price, :name, :department, :image
def initialize
self.color = Faker::Commerce.color
self.price = Faker::Commerce.price
self.name = Faker::Commerce.product_name
self.department = Faker::Commerce.department
+ self.image = "http://lorempixel.com/g/600/600/"
end
end
View
@@ -11,19 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140609025638) do
-
- create_table "people", force: true do |t|
- t.string "email"
- t.string "ip_address"
- t.string "name"
- t.string "credit_card"
- t.text "bio"
- t.string "phone"
- t.string "avatar"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
+ActiveRecord::Schema.define(version: 20140605141830) do
create_table "users", force: true do |t|
t.string "email", default: "", null: false

0 comments on commit 28b3011

Please sign in to comment.