Created
December 11, 2019 22:06
-
-
Save Haguilar91/e524054ea639cc08647913433b1b5ce6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if current_doctor %> | |
<!--Ficha va aqui--> | |
<%conversation = current_member.mailbox.conversations.find(params[:id])%> | |
<div class="jumbotron"> | |
<h1>Informacion de Paciente</h1> | |
<p>Edad: <%=@user.age%></p> | |
<p>Resumen del paciente: </p> | |
<p><%=@user.username%></p> | |
<p> Ingresar notas: </p> | |
<%=conversation.id%> | |
</div> | |
<%= form_for @note, remote: true do |f| %> | |
<%= f.hidden_field(:doctor_id, :value => current_doctor.id)%> | |
<%= f.hidden_field(:user_id, :value => @user.id)%> | |
<%= f.rich_text_area :body %> | |
<%= f.submit "Guardar Nota" %> | |
<% end %> | |
<!--Ficha termina aqui--> | |
<%end%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create | |
@note = Note.new(note_params) | |
@note.save | |
respond_to do |format| | |
format.html { redirect :back } | |
format.js | |
end | |
debug @note | |
end | |
# PATCH/PUT /notes/1 | |
# PATCH/PUT /notes/1.json | |
def update | |
@note.update(note_params) | |
respond_to do |format| | |
format.html { redirect :back } | |
format.js | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment