There is an alternative way to do this to send a hidden_field
but with this you would need to use form
for example: -
<%= form_tag url_for(:controller => 'admin', :action => 'edit_employee') do %>
<%= hidden_field_tag 'is_dialog', 'true' %>
<!--you can edit this button using css to look it like `link_to` -->
<% content_tag :button :type => :submit, :class => :your_class do %>
Edit
<% end %>
<%end%>
at controller you can do this: -
def edit_employee
if params[:is_dialog] == 'true'
#render layout: false
else
#your code...
end
end
hope its clear for you,this is just an alternative way, otherwise you can do is using ajax request in which whatever you will send will not visible in url,