world_controller.rb
@users = User.search(params[:terms]).where("confirmed_at is not null")
search.html.erb
<%= (t 'search_results_for') %> <%= @terms %>
<% @users.each do |u| %>
<%= link_to "#{u.first_name} #{u.middle_name} #{u.last_name}",
page_path(name: u.name) %>
<% ua
I put a search form in my layout where the search field is named "terms"
but then I get an unpermitted parameters for 'term' Do I need to declare
term as an attr_accessor and use the :user in strong params in my world
controller because I'm searching the User model
--
You received this message
2 matches
Mail list logo