form_for isn't supposed to return anything, necessarily. It works purely via
side-effect. I'm not sure I see the issue here.

On Sun, Dec 13, 2009 at 9:58 AM, grimen <[email protected]> wrote:

> My view helper looks like this:
>
> def facebook_connect_form(for_resource, options = {})
>          logout_form = options.delete(:logout) || (options[:method]
> == :delete)
>          options.reverse_merge!(
>              :id => (logout_form ? 'fb_connect_logout_form' :
> 'fb_connect_login_form'),
>              :style => 'display:none;'
>            )
>          resource = ::Devise::Mapping.find_by_path(request.path).to
> rescue for_resource
>          url = logout_form ? destroy_session_path(resource) :
> session_path(resource)
>          form_for(resource, :url => url, :html => options) { |f| }
> end
>
> but it turns out only the last line is the problemistic: form_for
> (resource, :url => url, :html => options) { |f| }
>
> When I install HAML in my Rails-project, and I call this method from
> an ERB-view (consider I need ERB sometimes), then:
>
> form_for(resource, :url => url, :html => options) { |f| }   # => nil
>
> When I call it from a HAML view it works. When I uninstall HAML from
> the project, and call it from ERB, it works.
>
> What's the problem here?
>
>
> grimen
>
>
>
> --
>
> 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] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>
>
>

--

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.


Reply via email to