On 14 March 2013 06:57, avinash behera <[email protected]> wrote: > So, my requirement is :- > > I have an Image table & a related_image table. > image has_many related_images. > & related_images belongs to many images. > Those images in both the tables are in sequence(we can change the sequence- > That will be a problem in case of belongs to many images). > > So, this seems to be a better option to save images as id. > In s3, I am saving both the images(images & related_images) in one folder as > <id>.png or <id>.jpg > > After saving into s3, there are some other process to do like creating > .plist file from the json objects & others. Here I require those data from > s3. > > I was getting an interesting issue with heroku. > I was doing a db:reset & set the default id to start with 1000 & 10000 > respectively. > It was working for the first time. If I do again a db:reset it goes. It > starts from 1.
I can't say I exactly follow what you want, but I still suggest not to use the id. Using the id causes problems as you have found out. Instead simply add another field (image_id for example) and set it to whatever values you want, independent of the id. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

