Re: Different way to pass a value to my controller, than "array('controller' => 'products', 'action' => 'view', $product['Product']['id'])"
On Thu, Oct 14, 2010 at 5:20 PM, Tomfox Wiranata
<tomfox.wiranata@gmail.com> wrote:
> thx cricket.
>
> my jquery request looks like this, calling the action "rate" and
> passing a value..
>
> $('#rating').load('rate', {data: ratingValue});
That doesn't look like a proper URL. In any case, how dies this affect
your call to /products/view?
> i have to admit, I still dont get the sense of routing....when I use
> the first one, the action view will still be called by view(id),
> right???
Yes. It's saying that any requests for /products/view/SOME_ID should
be routed to the view action.
> could you go into details with array('id' => '[0-9]+' ?? why 0-9?
[0-9]+ is a regular expression. It matches any integer number.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home