Guest User

Untitled

a guest
May 26th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. >> @moo.to_s
  2. => "james cosby-wolf was Zen order 27,\n so we'll call it number 27."
  3. >> @moo.moocash_orders_id
  4. => 27
  5. >> @moo.save
  6. ActiveRecord::StatementInvalid: SQLite3::SQLException: SQL logic error or missing database: INSERT INTO "moocash_orders" ("moocash_orders_id", ... "created_at") VALUES(NULL, ... NULL, '2008-11-06 17:40:30', '2008-11-06 17:40:30')
  7.  
  8. class MoocashOrder < ActiveRecord::Base
  9. attr_reader :student_fname, :moocash_orders_id
  10.  
  11. ##stuff
  12.  
  13. def to_s
  14. string = "#{@student_fname} #{@student_lname} was Zen order #{@moocash_orders_id},"
  15. + " so we'll call it number #{@moocash_id}."
  16. end
  17.  
  18. end
Add Comment
Please, Sign In to add comment