-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
log al 70%, falta expediente y solicitud de creacion, y los que se mo…
…difican
- Loading branch information
Showing
18 changed files
with
371 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ def show | |
|
||
def create | ||
x = Mensaje.crear(params) | ||
x.logC | ||
redirect_to root_path | ||
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,31 @@ | ||
class Asignacion < ActiveRecord::Base | ||
validates_presence_of :expediente_id,:enlace_id,:descripcion | ||
|
||
def logC | ||
|
||
#enlace_id: integer, descripcion: text, fechaInic: datetime, expediente_id: integer, fechaCrear: datetime, fechaMod: datetime, usuarioRes: integer, usuarioMod: integer, created_at: datetime, updated_at: datetime, plazo: integer, completada: boolean | ||
file = File.open("public/historial", "a") | ||
fecha = DateTime.now.to_s | ||
mod = self.usuarioRes | ||
rol = User.find(self.usuarioRes).rol.nombre | ||
descripcion = "creacion de asignacion" | ||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "descripcion" + "\t" + "N/A" + "\t" + self.descripcion + "\t" + descripcion + "\n") | ||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "enlace_id" + "\t" + "N/A" + "\t" + self.enlace_id.to_s + "\t" + descripcion + "\n") | ||
|
||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "fechaInic" + "\t" + "N/A" + "\t" + self.fechaInic.to_s + "\t" + descripcion + "\n") | ||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "expediente_id" + "\t" + "N/A" + "\t" + self.expediente_id.to_s + "\t" + descripcion + "\n") | ||
|
||
|
||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "fechaCrear" + "\t" + "N/A" + "\t" + self.fechaCrear.to_s + "\t" + descripcion + "\n") | ||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "fechaMod" + "\t" + "N/A" + "\t" + self.fechaMod.to_s + "\t" + descripcion + "\n") | ||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "usuarioRes" + "\t" + "N/A" + "\t" + self.usuarioRes.to_s + "\t" + descripcion + "\n") | ||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "usuarioMod" + "\t" + "N/A" + "\t" + self.usuarioMod.to_s + "\t" + descripcion + "\n") | ||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "plazo" + "\t" + "N/A" + "\t" + self.plazo.to_s + "\t" + descripcion + "\n") | ||
file.write(fecha + "\t" +mod.to_s+ "\t" +rol.to_s+ "\t" + "asignacion" + "\t" + "completada" + "\t" + "N/A" + "\t" + "false" + "\t" + descripcion + "\n") | ||
|
||
file.close() | ||
|
||
|
||
end | ||
|
||
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
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
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
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
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
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
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
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
Oops, something went wrong.