I want to display a Button based on wether the id exists.
_form.html.erb
<%= @customer.id? %>
<div class="pull-right">
<%= button_to 'Kundenrofil', customer_path(@customer), method: :get %>
</div>
<%= end %>
I use this inside a form for making a new customer and also for editing a customer.
If I edit a customer everything works fine but if I make a new user it gives me an error because
id=nil
How do I do it in the _form.html.erb