Sunday, November 21, 2010

Re: [Rails] Re: Re: Troubles getting :id

On 21 November 2010 14:44, Jose tomas R. <lists@ruby-forum.com> wrote:
> Colin Law wrote in post #962926:
>> On 21 November 2010 13:01, Jose tomas R. <lists@ruby-forum.com> wrote:
>>> wow, that was easy to fix. it's ".id" cause i need just the product ID
>>> thanks for your help and advice
>>
>> Please quote previous message when replying, it makes it easier to
>> follow the thread.  I presume the fix was to use param[:id].  If all
>> you need is the id itself why are you bothering to say Find the record
>> with id params[:id] and then take the id of it?  Why not just use
>> params[:id] in the first place?
>>
>> Colin
>
> I just notice that, so a :id => @product would be necessary to pass the
> id to the other controller, so the Product.find is useless

Sorry, that sentence makes no sense to me at all.

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@googlegroups.com.
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate