You are reading a really old web, recordselect is not in google code anymore, but README in github is not updated either
Do not change your layout, don't add record_select_includes, it doesn't exist anymore because current way is adding //= require record_select to asset manifest. Anyway, you don't have to add anything else to your application manifest, ActiveScaffold already includes record_select to assets through record_select bridge when recordselect gem is installed. El jueves, 23 de febrero de 2017 12:25:07 (CET) Chee Chong Hwa escribió: > Hi Sergio > > Based on the > wiki https://code.google.com/archive/p/recordselect/wikis/Install.wiki > This is the steps I took : > > 1. added to gem file > > gem 'recordselect', '~> 3.6' > > 2. gem install record_select > > 3. gem install paginator > > 4. Added to apllication.html.erb > > <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' > %> > > <%= javascript_include_tag :defaults %> > <%= record_select_includes %> > > 5. In rootcause controller > > class RootcausesController < ApplicationController > record_select :per_page => 5, :search_on => 'rootcause' > active_scaffold :"rootcause" do |conf| > end > end > > 6. In tasks controller > > active_scaffold :"task" do |conf| > conf.label = "Tasks" > conf.columns = [:task,:date,:rootcause,:suggestion, :action,:completed, > > :version ] > > conf.columns[:rootcause].form_ui = :record_select > end > > RESULT ERROR > <snip> > Completed 500 Internal Server Error in 2735ms (ActiveRecord: 0.0ms) > ActionView::Template::Error (undefined local variable or method > `record_select_i > ncludes' for #<#<Class:0x9edd788>:0x9edcb10>): > 7: <%= stylesheet_link_tag 'application', media: 'all', > 'data-turbol > inks-track': 'reload' %> > 8: <%= javascript_include_tag 'application', > 'data-turbolinks-track': ' > reload' %> > 9: <%= javascript_include_tag :defaults %> > 10: <%= record_select_includes %> > 11: </head> > 12: > 13: <body> > > app/views/layouts/application.html.erb:10:in > `_app_views_layouts_application_htm > l_erb___571246829_83175600' > Rendering > C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0. > 1/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb > withi > n rescues/layout > Rendering > C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0. > <snip> > > Q. What else am I missing out. > > Please help. So near and yet so far :-( > > On Wednesday, 22 February 2017 19:09:25 UTC+8, Sergio Cambra wrote: > > To use :record_select form_ui you need to install recordselect gem > > > > El miércoles, 22 de febrero de 2017 9:55:06 (CET) Chee Chong Hwa escribió: > > > Hi Segio > > > > > > Tried to use > > > > > > active_scaffold :"task" do |conf| > > > > > > conf.label = "Tasks" > > > > > > conf.columns = [:task,:date,:rootcause,:suggestion, :action, > > > : > > > :completed, :version ] > > > : > > > conf.columns[:rootcause].form_ui = :record_select > > > > > > end > > > > > > Click edit and got this error "Failed Request' > > > > > > > > > > > > Back trace is as follows: > > > > > > > > > Completed 500 Internal Server Error in 1218ms (ActiveRecord: 0.0ms) > > > > > > ActionView::Template::Error (Unknown form_ui `record_select' for column > > > `rootcau > > > > > > se'): > > > 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 -%> > > > > C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_scaffo > > ld> > > > -ad7 e72fbdff0/lib/active_scaffold/helpers/form_column_helpers.rb:30:in > > > `active_scaff > > > old_render_input' > > > > C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_scaffo > > ld> > > > -ad7 e72fbdff0/lib/active_scaffold/helpers/form_column_helpers.rb:10:in > > > `active_scaff > > > old_input_for' > > > > C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/bundler/gems/active_scaffo > > ld> > > > -ad7 > > > > > > class Task < ApplicationRecord > > > belongs_to :rootcause > > > validates :task, presence:true, uniqueness:true > > > def to_label > > > > > > "Tasks: #{task}" > > > > > > end > > > > > > end > > > > > > class Rootcause < ApplicationRecord > > > has_many :tasks > > > validates :rootcause, presence:true, uniqueness:true > > > > > > def to_label > > > > > > "Root Cause: #{rootcause}" > > > > > > end > > > > > > end > > > > > > Q. Am I missing something ? > > > > > > What else must I do other than putting in controoler > > > > > > conf.columns[:rootcause].form_ui = :record_select -- 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.
