Hi, it s quite uncommon to hijack a running thread....
Nevertheless, which version of active_scaffold are you using? -- Volker On Jan 25, 12:48 pm, Yves-Emmanuel Jutard <[email protected]> wrote: > Hello, > > I have a data structure like that : > * Post (post/posts) which "has_many" post_meta_datas > * PostMetaData (post_meta_data/post_meta_datas) which "belongs_to" post > > I write a simple controller for using activescaffold, and when I list my > posts, I get a nasty error "uninitialized constant Post::PostMetaDatum" > > It looks like (I think...) that ActiveScaffold is trying to access the > children post_meta_data and use an inflexion "datum". > > I don't understand since I haven't written any custom inflection, and > Ruby on Rails has generated the pluralized "datas" itself. > > Can someone help me ? > > Thanks. > > Le 25/01/2011 09:43, vhochstein a crit : > > > Hi Jeff, > > > I ve reproduced your issue on my side. Seems that UJS is nt working, > > however unfortunetly I cannot tell you why so far. > > > You may try instead a slightly different approach. > > Instead of calling render :active_scaffold... in _form.html.erb, > > you may override _update_form.rb in your controller view directory: > > <%= render :super %> > > <%= render :active_scaffold => "family_contacts", :constraints => > > { :family_id => @record.id } %> > > > Hope that helps. > > > -- > > Volker > > > On Jan 22, 5:41 am, Jeff Surrett<[email protected]> wrote: > >> I was away for a while but now I am back. sorry for the delay. > > >> I have created a form override for families called _form.html.erb > >> containing: > > >> <code> > >> <ol class="form"<%= 'style="display: none;"' if columns.collapsed - > >> %>> > >> <% column = active_scaffold_config.columns[:account_name] -%> > >> <li class="form-element<%= 'required' if column.required? %> <%= > >> column.css_class unless column.css_class.nil? %>"> > >> <%= render :partial => form_partial_for_column(column), > >> :locals > >> => { :column => column } -%> > >> </li> > >> </ol> > > >> <%= render :active_scaffold => "family_contacts", :constraints => > >> { :family_id => @record.id } %> > > >> </code> > > >> When I edit a family record, the form opens as expected with a field > >> from the family table and an embedded form of family_contacts which > >> belongs_to family (with the appropriate has_many relationship in > >> family). When I try to edit a family contact record, the inline form > >> appears as expected and allows me to make changes to its fields, but > >> when I click the update button, it updates the record but then gets > >> "Redirected > >> tohttp://localhost:3000/family_contacts?eid=be3a15b3b3877d869549f3505e4..." > > >> I would like for the update to occur and remain on the current page. > > >> On Jan 7, 12:32 am, vhochstein<[email protected]> wrote: > > >>> Hi Jeff, > >>> Well, let s see how far we get. Currently, it seems that UJS is nt > >>> working in your nested scaffold. Can you please post what you did so > >>> far? > >>> -- > >>> Volker > >>> On Jan 6, 3:48 pm, Jeff Surrett<[email protected]> wrote: > >>>> I would like to have the user be able to edit a form which would > >>>> include nested active scaffolds for each has_many association instead > >>>> of using subforms like it does currently. I think that using nested > >>>> scaffolds gives a more consistent look and feel and more flexibility > >>>> such as sorting of records, using action_links on the group of records > >>>> like the new batch action and other custom actions. > >>>> The important part for this to work, is that any actions performed on > >>>> the nested (embedded) scaffold would just update (replace) that > >>>> scaffold inline similar to how it works with nested scaffolds now. > >>>> On Jan 6, 2:36 am, vhochstein<[email protected]> wrote: > >>>>> Hi, > >>>>> I ve never tried, but it is an interesting idea. > >>>>> What is your specific requirement for such a feature? > >>>>> -- > >>>>> Volker > >>>>> On Jan 6, 12:08 am, Jeff Surrett<[email protected]> wrote: > >>>>>> Is there a way of having nested scaffolds appear for the associated > >>>>>> tables instead of subforms in an update form? I tried to embed a > >>>>>> scaffold in a form override but when I update a record in the embedded > >>>>>> scaffold, it takes me the main page for that scaffold instead of > >>>>>> updating inline. I am using Vhochstein's rails 3 branch of AS. -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.
