#1219 ✓not-applicable
Juanma Cervera

Rails3, haml & datamapper : - form_for @person do |f| renders nothing

Reported by Juanma Cervera | March 17th, 2010 @ 05:43 AM | in 1.0.0

In a rails3 application created with the template from http://github.com/snusnu.
When using haml.

There is some error in the rendering of a _form.html.haml partial (one generated with rails3-generators gem).

If it is haml template the form_for @person block renders nothing.
It works without problems when rendering the same erb template.

I don't know if this a datamapper or a haml problem, but the same works with activerecord.

Juanma Cervera

Comments and changes to this ticket

  • Juanma Cervera

    Juanma Cervera March 17th, 2010 @ 05:46 AM

    I can upload a tar file with a sample app

  • siplux

    siplux March 23rd, 2010 @ 01:55 PM

    I believe it is a Haml problem (and sometimes a Rails problem). Forms are working for me, do you have the newest version of Haml and the plugin installed to "vendor"?

  • Juanma Cervera

    Juanma Cervera March 25th, 2010 @ 07:14 AM

    Well, I don't know what has changed, but with the last updates to all the gems everything is performing well.
    This ticket can be closed

    Thanks

  • Martin Gamsjaeger (snusnu)

    Martin Gamsjaeger (snusnu) March 25th, 2010 @ 09:00 AM

    • State changed from “new” to “not-applicable”
    • Tag set to dm-rails
    • Assigned user set to “Martin Gamsjaeger (snusnu)”
    • Milestone set to 1.0.0

    There have been some changes to rails form handling iirc. I never used haml myself, but if you say this ticket can be closed, then I'll believe you :)

  • Jesse Reynolds

    Jesse Reynolds February 23rd, 2012 @ 06:44 PM

    • Milestone order changed from “0” to “0”

    Hmmm, well I'm getting this exact same behaviour current gem versions, eg:
    ruby 1.9.2p290
    rack 1.4.1
    rails 3.2.1
    haml 3.1.4
    dm-rails 1.2.1
    dm-* 1.2.0
    dm-active_model 1.2.1

       %p
         %label{:for => "request_impact_severity"} Impact Severity with helper
         %br
         - select_tag("request[impact_severity]", options_for_select([['Negligable', 1],['Marginal', 2],['Serious', 3],['Critical', 4],['Catastrophic', 5]], @change_request.impact_severity))
    

    renders as:

       <p>
         <label for='request_impact_severity'>Impact Severity with helper</label>
         <br>
       </p>
    

    trying form_tag similarly nukes all it's child elements (ie the whole form vanishes). form_for however throws an error, like wrong number of arguments (3 instead of 2).

  • Jesse Reynolds

    Jesse Reynolds February 23rd, 2012 @ 09:40 PM

    Reverted rails gems to 3.1.x and the problem remains.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Attachments

Tags

Pages