On Jueves, 24 de Septiembre de 2009 18:17:56 Barnettech escribió: > The active scaffold is working great I just can't add new columns to > the database/active_scaffold. Please help. > > I just manually added 2 columns to the database, I don't use > migrations currently. I added the columns to this line in my > controller (I added center_manager1 and center_manager2): > > config.columns = > [:page_title,:page_heading_title,:page_stub,:parent,:short_description,:met >a_keywords,:main_content, > > :address_line_1,:address_line_2,:search_link,:map_google,:map_yahoo,:ph > :one,:center_manager1,center_manager2,:located_brief,:directions,:parki > :ng,:public_transportation,:image_url_1,:image_url_2,:image_url_3,:loca > :tion_holidays,:location_hours,] > > and it doesn't recognize the new column: > > I get this error: > > ActionView::TemplateError (undefined method `center_manager1' for > #<Location:0x688ac9c>) on line #7 of vendor/plugins/active/frontends/ > default/views/_form_attribute.rhtml:
Have you aded center_manager1 to database? If you want to show a column in active_scaffold it must be a real column, an association or a virtual column. A real column must exist in database, a virtual column it's made with methods in the model. In this case, if you want a virtual column you should add center_manager1 and center_manager1= methods to your Location model. -- Sergio Cambra .:: entreCables S.L. ::. Mariana Pineda 23, 50.018 Zaragoza T) 902 021 404 F) 976 52 98 07 E) [email protected] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
