Re: [Erlangweb-users] Problems in step1 of tutorial
Brought to you by:
etcerlangweb,
paulgray
|
From: Roberto A. <rob...@er...> - 2010-03-18 13:36:52
|
On 03/18/2010 08:37 AM, Elena Bobrova wrote:
> hmm...
> This rule in dispatch.conf
>
> {dynamic, "^/item/show/(?<id>[0-9]+)$", {browser, show_item}}.
>
> does not work for me for "/item/show/1".
>
> You can try this one:
> {dynamic, "^/item/show/([0-9]+)$", {browser, show_item}}.
You might want to keep that "id", since it could be extremely helpful.
In your controller, you'll be able to refer easily to that parameter by
name, instead of scanning the list of all available arguments.
Cheers,
Roberto Aloi
--
University of Kent - Erlang Solutions Ltd.
Twitter: @prof3ta
Blog: http://aloiroberto.wordpress.com
---------------------------------------------------
---------------------------------------------------
WE'VE CHANGED NAMES!
Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
www.erlang-solutions.com
|