It uses to_label method in your model, as ActiveScaffold, you can change 
to_label method 
in your model. Or setup recordselect to use different method or partial:


Here is some old doc, still applies:
https://code.google.com/archive/p/recordselect/wikis/HTMLRecords.wiki[1] 

In summary, you can use partials, and set partial name with :label option:

record_select ..., :label => 'partial name'

Or use a proc or lambda:

record_select ..., :label => proc { |r| r.label_method }

El jueves, 23 de febrero de 2017 16:15:53 (CET) Chee Chong Hwa escribió:
> Hi Sergio
> 
> Yay ! It works
> 
> But its shows as Root Cause:FEATURE, how can I make as FEATURE ?
> 
> On Thursday, 23 February 2017 22:12:32 UTC+8, Sergio Cambra wrote:
> > Add record_select_routes to your resources routes:
> > 
> > 
> > 
> > resources :rootcauses do
> > 
> > record_select_routes
> > 
> > concerns :active_scaffold
> > 
> > end
> > 
> > 
> > 
> > It will define get browse route on collection
> > 
> > El jueves, 23 de febrero de 2017 15:02:21 (CET) Chee Chong Hwa escribió:
> > > Hi Sergio
> > > 
> > > 
> > > 
> > > As suggested, I have removed from application.html.erb, stop server and
> > > 
> > > rails s
> > > 
> > > 
> > > 
> > > Still Request failed when I click Edit or Create New
> > > 
> > > 
> > > 
> > > Completed 500 Internal Server Error in 1631ms (ActiveRecord: 0.0ms)
> > > 
> > > 
> > > 
> > > ActionView::Template::Error (No route matches {:*action=>"browse"*,
> > > 
> > > :controller=>"
> > > 
> > > rootcauses", :id=>"8"}):
> > > 
> > > 24: <%= render_column(column, @record, renders_as, scope) %>
> > > 
> > > 25: <% end %>
> > > 
> > > 26: <% else -%>
> > > 
> > > 27: <li class="form-element <%= 'required' if column.required? %> <%=
> > > 
> > > colu
> > > 
> > > mn.form_ui %> <%= column_css_class %>">
> > > 
> > > 28: <%= render_column(column, @record, renders_as, scope,
> > > 
> > > !authorized) %
> > > 
> > > 
> > > 
> > > 29: </li>
> > > 
> > > 30: <% end -%>
> > > 
> > > 
> > > 
> > > actionpack (5.0.1) lib/action_dispatch/journey/formatter.rb:51:in
> > 
> > `generate'
> > 
> > > My source codes :-
> > > 
> > > 
> > > 
> > > class RootcausesController < ApplicationController
> > > 
> > > record_select :per_page => 5, :search_on => 'rootcause'
> > > 
> > > active_scaffold :"rootcause" do |conf|
> > > 
> > > end
> > > 
> > > end
> > > 
> > > 
> > > 
> > > class TasksController < ApplicationController
> > > 
> > > active_scaffold :"task" do |conf|
> > > 

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to