Selvan
2007-Oct-29 20:08 UTC
UI drop down list pulled from database values in activescaffold
as i''m finding it difficult to override the form Ui elements using activescaffold -= i''m looking for a help to build a drop down list in UI (values pulled from databse through SQL query) and so user can select these valus while submitting to database. pls provide any example strictly using activescaffold plugin. thanks selvan-kalaiselvan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Brian Hogan
2007-Oct-29 20:36 UTC
Re: UI drop down list pulled from database values in activescaffold
While I''m sure someone here can help you, please post to ActiveScaffold''s discussion list, as ActiveScaffold is not part of Rails. On 10/29/07, Selvan <kalaiselvan.p-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > as i''m finding it difficult to override the form Ui elements using > activescaffold -= i''m looking for a help to build a drop down list in > UI (values pulled from databse through SQL query) and so user can > select these valus while submitting to database. > > pls provide any example strictly using activescaffold plugin. > > thanks > selvan-kalaiselvan > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Acroterra
2007-Oct-30 00:12 UTC
Re: UI drop down list pulled from database values in activescaffold
This is actually very easy using Active Scaffold if you have your models setup properly. Here is some example syntax in your controller: active_scaffold :model_name do |config| config.columns = [:id, :drop_down_item, .....] config.columns[:drop_down_item].ui_type = :select end The key is this line config.columns[:drop_down_item].ui_type = :select and specifically .ui_type = :select ......depending on the version of active_scaffold you are using you may have to use form_ui instead of ui_type. Read the documentation at this address: http://activescaffold.com/docs/api-column Hope that helps, Wes On Oct 29, 2:08 pm, Selvan <kalaiselva...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> as i''m finding it difficult to override the form Ui elements using > activescaffold -= i''m looking for a help to build a drop down list in > UI (values pulled from databse through SQL query) and so user can > select these valus while submitting to database. > > pls provide any example strictly using activescaffold plugin. > > thanks > selvan-kalaiselvan--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---