I'm using a hidden label in a form_for. It is not passing the value to the controller. I've updated the params.require to permit the field but for some reason it is not passing the value.
The message I get on my console: ArgumentError (wrong number of arguments (given 1, expected 2)
posts_controller.rb
def confirm
@post = Post.find_by(id: params[:id])
@post.toggle!(:confirm)
@post.update_attribute(props: params[:props])
redirect_to root_url
end
feed.html.erb
<%= form_for @post, :html => {:class => "form-inline"}, url: confirm_post_path(feed), method: :patch, :remote=>true do |f| %>
<div class="form-group">
<label class="sr-only"><%= f.label :props %></label>
<%= f.select :props, ['one', 'two', 'three'], class: 'form-control', prompt: "Give Prop" %>
</div>
<div class="form-group">
<%= f.submit "Confirm", class: "btn-primary btn-xs form-control" %>
</div>
<% end %>
labelor from yourselect?