Let me clarify. The issue is column override, not the column form override. Column override always show the formatted value, no matter inplace_edit is true or :ajax. The makes the column unclickable.
By looking at file vendor/plugins/active_scaffold/lib/active_scaffold/helpers/list_column_helpers.rb, I added this to my helper. It seems a really ugly hack, although it works. Is there a better way? def format_column_value(record, column) return number_to_phone(record.send(column.name)) if column == 'cell' super end On Sun, Jun 6, 2010 at 8:54 PM, [email protected] < [email protected]> wrote: > Hi, > > Please use columns[:cell].inplace_edit = :ajax, this will use an ajax > request each time you click inplace_edit, which should pick up your > column override. > > inplace_edit = true works only with default form fields, but has the > advantage of not generating an ajax request each time. > > -- > Volker > > > > On Jun 7, 5:48 am, Richard Zheng <[email protected]> wrote: > > Hi, > > > > I have a column called 'cell' which has a string of 10 digits number. In > > helper, a method 'cell_column(record)' uses number_to_phone to show it > > nicely. I want to enable inplace_edit, so in controller, > > columns[:cell].inplace_edit = true. Since cell_column has priority, the > > inplace_edit doesn't work. > > > > What's the best way to enable inplace_edit, and also let it show it > nicely? > > > > Thanks, > > -- > 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.
