Controller method
def status
@st = params[:st_type].to_i
@user_id = params[:user_id]
@post_id = params[:pt_id]
@a = Apply.find_by_user_id_and_post_id(@user_id, @post_id)
@a.update_attributes(status: @st)
flash[:success] = "Welcome to the Sample App!"
end
Link doesn't passes the post_id parameter-:
Link from the views
<%= link_to "Shortlist", status_applies_path(:user_id => @user.id, :pt_id => @post_id, :st_type => 1) %>
I am trying to get user_id and post_id from the from the url and pass it to my controller method 'def status'. Where it process the user_id and post_id to find the Apply id which further updates the attribute. The problem is I am able to fetch only user_id and not the post_id.


Applyor not getting ` @post_id = params[:pt_id]`