I have a project with the following:
controller: patient/edit
def edit
if current_user.nil?
redirect_to new_user_session_path
else
@states = State.all
@display_dashboard = true
@patient
@foo = 1
end
end
view patient/edit
<%= @patient.inspect %>
<%= @states.inspect %>
<%= @foo.nil? %>
I run byebug on the edit action and @patient has a value, so does @states. However, I can't see @patient on the view. Any ideas? I'm baffled.
before_action?before_action :set_patient, only: [:show,:edit,:update,:destroy,:dashboard,:allergies,:occupations, :information, :revisions]