Hey Brad,
thanks for clarifying this.
-andi
On Nov 25, 2005, at 16:20 Uhr, Brad Ediger wrote:
> AFAIK, Ruby collects any hash parameters at the *end* of the
> argument list into a hash. So,
>
> <%= form_tag {:action => :new}, :class => ''more''
%>
>
> may work. On the other hand, IIRC, it is considered deprecated to
> omit the parentheses on functions in views now. You would probably
> get a warning on the above. So the ''minimalist'' correct
ERb code
> would probably look like this:
>
> <%= form_tag( {action => :new}, :class => ''more''
) %>
>
> --
> Brad Ediger
> 866-EDIGERS
>
>
> On Nov 25, 2005, at 5:04 AM, Andreas Aderhold wrote:
>
>> Hi,
>>
>> the Rails book says i can use something like this in my view
>>
>> <%= form_tag :action => :new, {:class =>
''more''} %>
>>
>> This gives an syntax error, whereas only this (ugly looking) works:
>>
>> <%= form_tag( {:action => :new} , {:class =>
''more''} ) %>
>>
>> some ruby syntax stuff i get wrong here?
>>
>>
>> Best
>> Andi
>> _______________________________________________
>> Rails mailing list
>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>