generated from FGA0138-MDS-Ajax/template-repository
-
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.
csrf/tabelas documentos reunioes arrumadas com JULIA ROCHA E MARIA CLARA
- Loading branch information
1 parent
f7fedfa
commit 62f3e33
Showing
37 changed files
with
379 additions
and
133 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
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,3 +1,4 @@ | ||
class Reuniao < ApplicationRecord | ||
belongs_to :user | ||
has_many :reunioes_usuarios | ||
has_many :user, through: :reunioes_usuarios | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div id="<%= dom_id documento %>"> | ||
<p> | ||
<strong>Nome:</strong> | ||
<%= documento.nome %> | ||
</p> | ||
|
||
<p> | ||
<strong>Link:</strong> | ||
<%= documento.link %> | ||
</p> | ||
|
||
<p> | ||
<strong>User:</strong> | ||
<%= documento.user_id %> | ||
</p> | ||
|
||
</div> |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
json.extract! documento, :id, :nome, :link, :user_id, :created_at, :updated_at | ||
json.url documento_url(documento, format: :json) |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<%= form_with(model: documento) do |form| %> | ||
<% if documento.errors.any? %> | ||
<div style="color: red"> | ||
<h2><%= pluralize(documento.errors.count, "error") %> prohibited this documento from being saved:</h2> | ||
|
||
<ul> | ||
<% documento.errors.each do |error| %> | ||
<li><%= error.full_message %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
|
||
<div> | ||
<%= form.label :nome, style: "display: block" %> | ||
<%= form.text_field :nome %> | ||
</div> | ||
|
||
<div> | ||
<%= form.label :link, style: "display: block" %> | ||
<%= form.text_field :link %> | ||
</div> | ||
|
||
<div> | ||
<%= form.label :user_id, style: "display: block" %> | ||
<%= form.text_field :user_id %> | ||
</div> | ||
|
||
<div> | ||
<%= form.submit %> | ||
</div> | ||
<% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<h1>Editing documento</h1> | ||
|
||
<%= render "form", documento: @documento %> | ||
|
||
<br> | ||
|
||
<div> | ||
<%= link_to "Show this documento", @documento %> | | ||
<%= link_to "Back to documentos", documentos_path %> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<p style="color: green"><%= notice %></p> | ||
|
||
<h1>Documentos</h1> | ||
|
||
<div id="documentos"> | ||
<% @documentos.each do |documento| %> | ||
<%= render documento %> | ||
<p> | ||
<%= link_to "Show this documento", documento %> | ||
</p> | ||
<% end %> | ||
</div> | ||
|
||
<%= link_to "New documento", new_documento_path %> |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
json.array! @documentos, partial: "documentos/documento", as: :documento |
Oops, something went wrong.