no - that is it's in place David as it should be - I'm able to put the the BusinessItemHelper code in and observe it impact other models with the same attribute name, as well as remove it and see everything work again (except of course the functionality I want in BusinessItemHelper itself because I pulled out the form override)
On Jan 30, 5:40 pm, David C <[email protected]> wrote: > Is the 'helper :all' line in ApplicationController commented out (or > removed)? > > On Jan 29, 9:18 pm, greghauptmann <[email protected]> wrote: > > > it's working how I want in the "BusinessItem" model (as it's a virtual > > attribute and can't be updated), however for other models I don't > > expect that if they have an "amount" field that they should be > > impacted (whereas they currently are impacted). > > > I just noted the amount field in my "Recurring" model is also impact. > > > In summary: > > > BusinessItemHelper form override is: > > - for BusinessItem model: [working] > > - for Recurring model: [problem - picking up the "amount" form > > override by mistake] > > - for AutomatchBusinessItem model: [problem - picking up the "amount" > > form override by mistake] > > > Hope that clarifies the issue. Any ideas? > > > Thanks > > > On Jan 30, 2:23 pm, Kenny Ortmann <[email protected]> wrote: > > > > your problem is in your helper. > > > the amount form column is supposed to return the actual input as well. > > > module BusinessItemHelper > > > def amount_form_column(record, input_name) > > > # not this, record.amount > > > input record, input_name, :value => record.amount > > > end > > > end > > > > but i don't know that you need to over ride this in the helper, try > > > removing > > > this method and see what happens, if it doesn't work try what is above > > > > On Thu, Jan 29, 2009 at 9:35 PM, greghauptmann > > > <[email protected]>wrote: > > > > > Hi, > > > > > I have an issue whereby a form override for "amount" in one model, is > > > > impacting the view of another model that has "amount" as an > > > > attribute? That is in the 2nd model it is showing up as read only > > > > where it should not. > > > > > Know issue? Anyway to work around this? > > > > > ---------------------------------------- > > > > module BusinessItemHelper > > > > def amount_form_column(record, input_name) > > > > record.amount > > > > end > > > > end > > > > ----------------------------------- > > > > module AutomatchBusinessItemHelper > > > > # i.e. there is no "amount_form_column" specified here > > > > def automatch_bi_allocations_column(record) > > > > record.to_s_deep > > > > end > > > > end > > > > ----------------------------------------- > > > > ==> In the AutomatchBusinessItem edit form, the amount field is just a > > > > label, and not an edit box. If I take out the amount_form_column > > > > method in BusinessItemHelper it works. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
