...if they both are used. Works if either on of ERB or HAML is chosen - not both in same project. To me it seems like the HAML initialization messing with Rails in a de-coupled way, which is okay but should be mentioned in the README in such case I believe.
grimen On Dec 14, 12:29 am, grimen <[email protected]> wrote: > If this would the case - "isn't supposed to return anything, > necessarily" (which I don't understand) - please explain then why it > works expected with ERB but not HAML? That is an issue for sure. > > grimen > > On Dec 13, 9:42 pm, Nathan Weizenbaum <[email protected]> wrote: > > > > > 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.
