On 10 March 2011 16:18, Mark
<aalhilli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi
>
> I am wondering if anyone can assist with this:
>
> I have two models, one is task and the other is examples. I have
> developed an application that once you create a new task you are given
> 5 example fields.
>
> What I need is when a user wants to create a new task, he/she is given
> a list of five unique numbers. They can give their examples to each
> of these numbers, so:
> 1 example1
> 2 example 2
> 3 ...
> 4
> 5
>
> When the next task (task 2) is created, the unique numbers are
> incremented so it will be
>
> 6 example xx
> 7 ...
> 8
> 9
> 10
>
> Can anyone assist into how I can do this operation.
You could have another table in the database that has one record and
one field, containing the next number to use.
Colin
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.