This still isn't clearly answering my question. What does your ERB template look like? What does your Haml template look like? What does the rendered HTML look like in each case, and how is this wrong?
On Wed, Jan 6, 2010 at 9:41 PM, grimen <[email protected]> wrote: > The call is posted above, but here's a bit more readable one: > > http://pastie.org/769862 > > See my initial post for answer on your second question. Can't really > make it more clear than that and it should be easy to reproduce as > well: Just call form_for(resource, :url => url, :html => options) { | > f| } from a helper with the conditions mentioned in the end of my > initial post and peep how the output differs (without HAML plugin and > with HAML plugin). > > > grimen > > On Dec 14 2009, 3:28 am, Nathan Weizenbaum <[email protected]> wrote: > > How are you calling form_for in ERB and Haml? How isn't it working, > > specifically? > > > > > > > > On Sun, Dec 13, 2009 at 3:33 PM, grimen <[email protected]> wrote: > > > ...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]> > <haml%[email protected]<haml%[email protected]> > >< > > > haml%[email protected]<haml%[email protected]> > <haml%[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]<haml%[email protected]>< > haml%[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] <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.
