Kenny, Thanks, You say the def's go in the helper. Where to the override statements go? In the model? I am still learning about how Rails (and Ruby) is structured so I am little uncertain where each piece goes.
Thanks Pete On Feb 9, 8:57 pm, Kenny Ortmann <[email protected]> wrote: > You can just use overrides. > config.columns << :employee_number > columns[:employee_number].label = "Employee Number" > > in your controllers helper > > def employee_number_column(record) > record.employee# > end > > def employee_number_form_column(record, input_name) > input(record, 'employee#") > end > > On Mon, Feb 9, 2009 at 5:18 PM, Sri Sri <[email protected]> wrote: > > Of course the select * will not work and you'll have to replace your > > 'employee#' with employee_number. So, it would be: > > > create or replace > > view my_view_name (id, employee_number,.....) AS > > select id, employee# .... > > from legacy_table_name > > / > > > Sri Sri wrote: > > > I wonder if creating a view would solve your problem. Try a simple view: > > create view my_table_name as > > select * from legacy_table_name > > > Luke Melia wrote: > > > I've (thankfully) never encountered such a DB column name, but you > > could try "employee#".to_sym > > > On Feb 7, 2009, at 8:48 PM, Pete wrote: > > > Anyone ever had to deal with a legacy database with embedded '#' in > > the column names? Like 'employee#'? When I use the syntax: > > > columns[:employee#].label = "Employee Number" > > > In a controller I get an error because it doesn't like the trailing # > > > Any idea on a workaround? > > > Pete > > > -- > > Luke [email protected]http://www.lukemelia.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
