Hi all! NOTE: all inline code below also viewable at https://gist.github.com/596e7e9992f42fba9b2d
I have some models (Person, Company, Events, etc). Some show fields on edit, others don't. I'm really flabbergasted at what's going on here. Company shows the form just fine, while Event and Person don't. And I really am browsing http://localhost:3000/people/1/edit and http://localhost:3000/companies/1/edit. I looked at #update_permitted?: they're identical between both models class Company < AR::B def update_permitted? # also tried simply returning true from here !acting_user.guest? end def view_permitted?(field) true end end I removed my form override in application.dryml: <extend tag="form" for="Person"> <old-form merge> <field-list: fields="first_name, last_name, email, address1, address2, address3, city, postal_code, home_number, mobile_number"/> </old-form> </extend> <extend tag="form" for="Company"> <old-form merge> <field-list: fields="name, address1, address2, address3, city, postal_code, main_number, fax_number, toll_free_number"/> </old-form> </extend> I also removed app/views/people/edit.dryml. Even if I change Person#update_permitted? to return true the form doesn't show any fields. The relevant part of the generated HTML looks like this: <div class="section with-flash content"> <div class="section content-header"> <h2 class="heading">Modification de <span class="view model::person:1"><a class="person-link" href="/people/1-bernier- gilles"><span class="view person-name ">Bernier, Gilles</span></a></ span></h2> <form method="post" action="/people/1-bernier-gilles" class="button-to"><div><input name="_method" type="hidden" value="delete" /><input class="button delete-button delete-person- button" onclick="return confirm('Are you sure?');" type="submit" value="Remove This Personne" /><input name="authenticity_token" type="hidden" value="cbQSYOo60ECXCQXcMVlrxld7Vys9iQ65JAPbUGl3Iv4=" /></ div></form> </div> <div class="section content-body"> <div class="section "> <h3 class="heading">Employeurs</h3> <div class="table-plus"> <div class="header"> <div class="search"> <form action="" class="search-form" method="get"><div class="hidden-fields"></div></form> </div> </div> <table> <thead> <tr class="field-heading-row"> <th class="company-heading"> <a class="column-sort company-heading-link" href="/ people/1/edit?sort=company">Entreprise</a> </th> </tr> </thead> <tbody> <tr class="odd employee model::employee:1"> <td class="company-view"> <span class="view employee-company model::company: 1"><a class="company-link" href="/companies/1-groupe-canam-inc"><span class="view company-name ">Groupe Canam Inc.</span></a></span> </td> </tr> </tbody> </table> </div> </div> </div> </div> What did I not do which I should have? I'm pretty sure I'm missing something very basic here. And yes, I did restart my server between changes, and am running in development mode. Thanks! François -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
