On 11/04/2010 10:50 AM, Sergio Cambra .:: entreCables S.L. ::. wrote:
On Miércoles, 3 de Noviembre de 2010 18:05:21 Dan Candea escribió:
On 11/03/2010 06:54 PM, Sergio Cambra .:: entreCables S.L. ::. wrote:
On Miércoles, 3 de Noviembre de 2010 17:44:58 Dan Candea escribió:
so I should i do it ?

def value_form_column(record, input_name)
column = active_scaffold_config.columns[:value]
id = active_scaffold_input_options(column)[:id]
select :record, :value, options_for_select(User::LIST[record.name]),
:name =>    input_name, :id =>     id

I'm updating the content of a select which doesn't exists, the id I get
above it doesn't exists
Please, can you explain your case in detail. What controller are you
accessing? UsersController?  Or another controller with user in a
subform? Post your user controller too. Is value a db attribute?
it's another controller with user in a sub form, but same this is
happening when I access directly the UserControler;

class UserController<   ApplicationController
    active_scaffold :user do|config|
      config.label = "Test"
      config.columns = [:name, :value]
      config.columns[:name].form_ui = :select
      config.columns[:name].options = {:options =>   User::LIST.map}
      config.columns[:name].update_column = :value
    end
end

Controllers in rails usually use plural form, UsersController instead of
UserController, although it should work anyway.

value is a db attribute. name also
and I'm using rails-2.3 branch

when I chose Create, a new form is created, as expected, with the config
columns as above.
I looked in the generated html and there is no<select.....>  </select>
element for the /value/ db attribute.
So the new select element which I update in value_form_column() function
with the specified id it doesn't exists.
You have to define value_form_column method in UserHelper to be used when you
go to UserController directly. Do you get value label at least?


yes. the label is there with a field for="record_value_32...."

the value_form_column is defined and the id I get, with the methods you told 
me, is the same with the one from the label



thank you for your patience


--
Dan Cândea
Does God Play Dice?

--
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.

Reply via email to