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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.