On Jueves, 4 de Noviembre de 2010 11:42:26 Dan Candea escribió:
> On 04.11.2010 12:13, Sergio Cambra .:: entreCables S.L. ::. wrote:
> > On Jueves, 4 de Noviembre de 2010 11:05:15 Dan Candea escribió:
> >> On 11/04/2010 11:55 AM, Sergio Cambra .:: entreCables S.L. ::. wrote:
> >>> This method return nil if record.name is nil and return the value
> >>> returned by
> >>>
> >>> logger.info (i don't know what returns). Change it with this:
> >>> def value_form_column(record, input_name)
> >>>
> >>> column = active_scaffold_config.columns[:value]
> >>> id = active_scaffold_input_options(column)[:id]
> >>> logger.info "##############################################
> >>> #{id}" select_options = record.name ? User::LIST[record.name] :
> >>> [] select :record, :value, select_options, :name =>
> >>> input_name, :id => id
> >>>
> >>> end
> >>
> >> with logger.info I was just trying to see the values for different
> >> variables so I can understand were is the problem.
> >> now it crashes and I receive
> >>
> >>
> >> ActionView::TemplateError (undefined method `name' for nil:NilClass) on
> >> line #7 of
> >> vendor/plugins/active_scaffold/frontends/default/views/_form_attribute.h
> >> tml .erb: 4:<label for="<%= active_scaffold_input_options(column,
> >> scope)[:id] %>"><%= column.label %></label>
> >> 5:</dt>
> >> 6:<dd>
> >> 7:<%= active_scaffold_input_for column, scope %>
> >> 8:<% if column.options.is_a?(Hash)&& column.options[:update_column] -%>
> >> 9:<%= loading_indicator_tag(:action => :render_field, :id =>
> >> params[:id]) %>
> >> 10:<% end -%>
> >
> > Backtrace isn't useful without removing backtrace silencers (uncomment
> > last line in config/initializers/backtrace_silencers.rb)
>
> I attached a file with the backtrace
>
> thank you
The exception is due to value column doesn't exist, there is no value column
in active_scaffold_config.columns.
Is the column named value? Becuase helper is named valorae_form_column
Are you accessing to UserController directly? Becuase helper override is on
another helper. If you are using a subform you will have to use
active_scaffold_config_for(User) and pass a scope to
active_scaffold_input_options.
It's easier to get it working in UserController, without subform, and then
modify it to work in a subform.
--
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.