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