I tried to save records with specific ids, but without any success ...

    @date = Time.now.to_date
    tour_id = (@date.year.to_s +  @date.month.to_s +
@date.day.to_s).to_i

 @tour = Tour.new(:id => tour_id, :scheduled_on => @date, :carts =>
@cart_works)
@tour.save!

id should be something like 20080918  (there could be only one record
per day...)

but it's stil using an incremental id...  1

(I am using sqlite3 dev...)

thanks for any help


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to