If that is the actual syntax you used, you need to make a correction:

def to_label
  #{model.item}
end

or something like that. It's in the API documents at the github wiki.

On Aug 2, 7:50 am, Yuriy Padlyak <[email protected]> wrote:
> The strange thing is that in is defined:
>   def to_label
>            model
>   end
>
> On Aug 2, 9:22 am, "[email protected]"
>
> <[email protected]> wrote:
> > define a to_label method in your product model
>
> > --
> > Volker
>
> > On Jul 30, 5:10 pm, Yuriy Padlyak <[email protected]> wrote:
>
> > > I've just removed 'config.actions.swap :search, :field_search' row
> > > from by controller and error gone. But now 'Products' included as
> > > second order association are displayed in list as:
>
> > > '#<Product:0xb6d67688>
> > > #<Product:0xb6d67688>
> > > #<Product:0xb6d0d1b0>
> > > #<Product:0xb6ce807c> '
>
> > > :(
>
> > > On Jul 30, 5:49 pm, Yuriy Padlyak <[email protected]> wrote:
>
> > > > Hello all,
>
> > > > I've used approach to display and search on second order association
> > > > property, as described 
> > > > in:http://groups.google.co.uk/group/activescaffold/browse_thread/thread/...
>
> > > > ,but for some reason I'm getting:
>
> > > >  RuntimeError in ProductionsController#list
>
> > > > Search is not enabled. Please enable it or remove any references in
> > > > your configuration (e.g. config.search.columns = [...]).
>
> > > > RAILS_ROOT: /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV
> > > > Application Trace | Framework Trace | Full Trace
>
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/vendor/plugins/
> > > > active_scaffold/lib/active_scaffold/config/core.rb:182:in
> > > > `method_missing'
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/app/controllers/
> > > > productions_controller.rb:21
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/app/controllers/
> > > > productions_controller.rb:2
>
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/vendor/plugins/
> > > > active_scaffold/lib/active_scaffold/config/core.rb:182:in
> > > > `method_missing'
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/vendor/plugins/
> > > > active_scaffold/lib/active_scaffold/configurable.rb:11:in
> > > > `instance_exec'
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/vendor/plugins/
> > > > active_scaffold/lib/active_scaffold/configurable.rb:11:in `configure'
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/vendor/plugins/
> > > > active_scaffold/lib/active_scaffold.rb:61:in `active_scaffold'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:380:in `load_without_new_constant_marking'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:380:in `load_file'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:521:in `new_constants_in'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:379:in `load_file'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:259:in `require_or_load'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:425:in `load_missing_constant'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:80:in `const_missing'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:92:in `const_missing'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > inflector.rb:361:in `constantize'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > inflector.rb:360:in `each'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > inflector.rb:360:in `constantize'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > core_ext/string/inflections.rb:162:in `constantize'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > routing/route_set.rb:443:in `recognize'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > routing/route_set.rb:436:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > dispatcher.rb:87:in `dispatch'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > dispatcher.rb:121:in `_call'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > dispatcher.rb:130
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > string_coercion.rb:25:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > string_coercion.rb:25:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:
> > > > 24:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > params_parser.rb:15:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > session/abstract_store.rb:122:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/
> > > > query_cache.rb:29:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/
> > > > connection_adapters/abstract/query_cache.rb:34:in `cache'
> > > > /home/yura/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/
> > > > query_cache.rb:9:in `cache'
> > > > /home/yura/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/
> > > > query_cache.rb:28:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/
> > > > connection_adapters/abstract/connection_pool.rb:361:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > failsafe.rb:26:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
> > > > `synchronize'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > dispatcher.rb:114:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > reloader.rb:34:in `run'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > dispatcher.rb:108:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb:
> > > > 31:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in
> > > > `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in
> > > > `each'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in
> > > > `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:
> > > > 17:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:
> > > > 13:in `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/chunked.rb:15:in
> > > > `call'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:
> > > > 64:in `process'
> > > > /home/yura/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:
> > > > 34:in `run'
> > > > /home/yura/.gem/ruby/1.8/gems/rails-2.3.5/lib/commands/server.rb:111
> > > > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
> > > > `gem_original_require'
> > > > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
> > > > script/server:3
>
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/vendor/plugins/
> > > > active_scaffold/lib/active_scaffold/config/core.rb:182:in
> > > > `method_missing'
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/app/controllers/
> > > > productions_controller.rb:21
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/vendor/plugins/
> > > > active_scaffold/lib/active_scaffold/configurable.rb:11:in
> > > > `instance_exec'
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/vendor/plugins/
> > > > active_scaffold/lib/active_scaffold/configurable.rb:11:in `configure'
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/vendor/plugins/
> > > > active_scaffold/lib/active_scaffold.rb:61:in `active_scaffold'
> > > > /home/yura/Documents/DEV/Ruby/workspace_linux/TPS_DEV/app/controllers/
> > > > productions_controller.rb:2
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:380:in `load_without_new_constant_marking'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:380:in `load_file'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:521:in `new_constants_in'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:379:in `load_file'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:259:in `require_or_load'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:425:in `load_missing_constant'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:80:in `const_missing'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > dependencies.rb:92:in `const_missing'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > inflector.rb:361:in `constantize'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > inflector.rb:360:in `each'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > inflector.rb:360:in `constantize'
> > > > /home/yura/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/
> > > > core_ext/string/inflections.rb:162:in `constantize'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > routing/route_set.rb:443:in `recognize'
> > > > /home/yura/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/
> > > > routing/route_set.rb:436:in
>
> ...
>
> read more »

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