That didn't work. It triggered a Javascript error. Are you sure lines 5-6 are correct?
George On Jan 28, 12:21 am, "[email protected]" <[email protected]> wrote: > Hi, > > you may try the following in your subscriptions controller: > Not beautiful, but should give you a starting point. > > def create_respond_to_js > if successful? > do_list > render :update do |page| > cancel_selector = "##{element_form_id(:action => :create)} > a.cancel".to_json > page << "$$(#{cancel_selector}).first().link.close();" > page.replace_html active_scaffold_content_id, :partial => > 'list', :layout => false > end > else > render :action => 'on_create' > end > end > > On 28 Jan., 04:47, George <[email protected]> wrote: > > > Exactly. The entire subscriptions sub-table for the account should be > > refreshed when a new subscription is added. > > > On Jan 27, 10:15 am, Kenny Ortmann <[email protected]> wrote: > > > > So you have an accounts page. > > > > subscriptions are nested under accounts. > > > > When you open an accounts subscriptions and then create a subscription > > > under > > > that account, you want to refresh the subscriptions for that account. > > > > is this correct? > > > > On Wed, Jan 27, 2010 at 11:41 AM, George <[email protected]> wrote: > > > > Is there an easy way to tweak the AJAX response so that an entire > > > > nested table is refreshed when a record is added, instead of simply > > > > adding the new record? > > > > > I have a situation where I have a nested table of dependencies (in > > > > this case, subscriptions) for an accounts page. I have customized the > > > > create action to add a new subscription record for the account. > > > > Because the create action modifies another subscription record in this > > > > table, I would like to either refresh that column as well or simply > > > > refresh the entire nested table. > > > > > -- > > > > 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]<activescaffold%[email protected]> > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/activescaffold?hl=en. -- 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.
