Created
February 1, 2011 22:30
-
-
Save whalec/806852 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> Course.make | |
ActiveRecord::RecordInvalid: Validation failed: Index slug has already been taken | |
from /usr/local/Cellar/gems/1.8/gems/activerecord-3.0.3/lib/active_record/validations.rb:49:in `save!' | |
from /usr/local/Cellar/gems/1.8/gems/activerecord-3.0.3/lib/active_record/attribute_methods/dirty.rb:30:in `save!' | |
from /usr/local/Cellar/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:242:in `save!' | |
from /usr/local/Cellar/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:289:in `with_transaction_returning_status' | |
from /usr/local/Cellar/gems/1.8/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction' | |
from /usr/local/Cellar/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:204:in `transaction' | |
from /usr/local/Cellar/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:287:in `with_transaction_returning_status' | |
from /usr/local/Cellar/gems/1.8/gems/activerecord-3.0.3/lib/active_record/transactions.rb:242:in `save!' | |
from /usr/local/Cellar/gems/1.8/gems/machinist-1.0.6/lib/machinist/active_record.rb:55:in `make' | |
from (irb):3 | |
>> Course.count | |
=> 0 | |
>> c = Course.new | |
=> #<Course id: nil, bag: nil, index_slug: nil, index_published: true, name: nil, session_options: nil, sector_id: nil, thumbnail_image_id: nil, header_image_id: nil, pre_course_material: nil, deleted_at: nil, created_at: nil, updated_at: nil> | |
>> c.name = "Foo" | |
=> "Foo" | |
>> c.base_price = 10.0 | |
=> 10.0 | |
>> c.introduction = "Blurg" | |
=> "Blurg" | |
>> c.description = "MEh" | |
=> "MEh" | |
>> c.session_options = "sdfsdfsdf" | |
=> "sdfsdfsdf" | |
>> c.valid? | |
=> true | |
>> c.save | |
=> true | |
>> Course.make | |
=> #<Course id: 3, bag: "{\"slug\":\"mrs-tess-goyette\",\"base_price\":\"23.5\",\"pub...", index_slug: "mrs-tess-goyette", index_published: nil, name: "Mrs. Tess Goyette", session_options: "cum repellendus et", sector_id: nil, thumbnail_image_id: nil, header_image_id: nil, pre_course_material: nil, deleted_at: nil, created_at: "2011-02-01 22:28:40", updated_at: "2011-02-01 22:28:40"> | |
>> Course.destroy_all | |
=> [] | |
>> Course.make | |
=> #<Course id: 4, bag: "{\"slug\":\"mr-alphonso-witting\",\"base_price\":\"90.8\",\"...", index_slug: "mr-alphonso-witting", index_published: nil, name: "Mr. Alphonso Witting", session_options: "id molestiae voluptatem", sector_id: nil, thumbnail_image_id: nil, header_image_id: nil, pre_course_material: nil, deleted_at: nil, created_at: "2011-02-01 22:28:58", updated_at: "2011-02-01 22:28:58"> | |
>> Course.destroy_all | |
=> [] | |
>> Course.count | |
=> 0 | |
>> Course.make | |
=> #<Course id: 5, bag: "{\"slug\":\"rossie-senger\",\"base_price\":\"7.2\",\"publish...", index_slug: "rossie-senger", index_published: nil, name: "Rossie Senger", session_options: "modi id necessitatibus", sector_id: nil, thumbnail_image_id: nil, header_image_id: nil, pre_course_material: nil, deleted_at: nil, created_at: "2011-02-01 22:29:14", updated_at: "2011-02-01 22:29:14"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment