One possible way to do this is to write a helper that returns a hash.
def observe_helper
{:url => {:controller => 'some_controller', :action =>
'lookup'}, :update => 'destination', :with => 'seed'}
end
In your haml:
= observe_field :lookup_field, observe_helper
Or something like that. Would it work?
BTW: I was under the impression that, for whatever reason, Rails
didn't appreciate symbols as the value elements of their hashes.
On Oct 31, 2007, at 8:36 AM, vld wrote:
>
> Hello :)
>
> I have a bunch of long-line statements, like this, but longer:
>
> = observe_field :lookup_field, :url => { :controller
> => :some_controller, :action => :lookup }, :update
> => :destination, :with => "seed"
>
> I have tried to format it multi-line properly as the following:
>
> = observe_field :lookup_field, |
> :url => { :controller => :some_controller, :action => :lookup }, |
> :update => :destination, |
> :with => "seed"
>
> Unfortunately it takes the beginning ":" as a filter indicator and
> errors out. How would I get around it?
>
> Vlad
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---