Hi all, How to use company_name on the url instead of company_id.
This is my routes:
get ‘company/:company_id’ => ‘company#company’, as: :company
This is my controller:
@company_view = Company.find(params[:company_id])
This is view:
<%=link_to company.company_name, company_path(:company_id => company_id)
%>
Thanks