Thanks. It didn't occur to me to use that with executable code.
On Sun, May 31, 2009 at 10:31 PM, Nathan Weizenbaum <[email protected]>wrote:
> The best way to do this is to take this big glob of code out of your view
> and move it into a helper. If you don't want to do that, though, use the
> Haml multiline syntax:
>
> - form_remote_for :portion, Portion.new, :url=> new_portion_url, |
> :loading=> 'Form.disable("portion_form")',
> :complete=> 'Form.enable("portion_form")',
> :html=> {:id=> 'portion_form' } do |f|
>
>
> On Sun, May 31, 2009 at 7:26 PM, Nicholas Van Weerdenburg <
> [email protected]> wrote:
>
>> I want to do the following: :ruby
>> form_remote_for :portion, Portion.new, :url=> new_portion_url,
>> :loading=> 'Form.disable("portion_form")',
>> :complete=> 'Form.enable("portion_form")',
>> :html=> {:id=> 'portion_form' } do |f|
>> .meal_type{:style=>"float: left;"}
>>
>> e.g. have my form_remote_for on multiple lines. However, I need to indent
>> the following line (meal_type), and I'm not sure how to do it.
>>
>> The other option:
>> - form_remote_for :portion, Portion.new, :url=> new_portion_url,
>> - :loading=> 'Form.disable("portion_form")',
>> - :complete=> 'Form.enable("portion_form")',
>> - :html=> {:id=> 'portion_form' } do |f|
>>
>> Didn't work either due to ";" being added after each line.
>>
>> Any suggestions?
>>
>> Thanks,
>> Nick
>>
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---