-
Notifications
You must be signed in to change notification settings - Fork 0
[MAT-26] [MAT-7] Teste 3 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kalebhenrique
wants to merge
9
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c44e2e3
add tailwindcss gem
kalebhenrique 86fbe1d
add devise gem
kalebhenrique 3caa786
add routes protection
kalebhenrique 675c039
add views devise
kalebhenrique 09ce295
change postgres to sqlite
kalebhenrique b1bbe94
fix format
kalebhenrique 8ee17ad
fix format
kalebhenrique a280b82
Merge branch 'main' into dev
kalebhenrique 429e6f9
Update new.html.erb
kalebhenrique File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,6 +1,6 @@ | ||
| class User < ApplicationRecord | ||
| # Include default devise modules. Others available are: | ||
| # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable | ||
| devise :database_authenticatable, :registerable, | ||
| devise :database_authenticatable, | ||
| :recoverable, :rememberable, :validatable | ||
| end | ||
This file contains hidden or 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,5 @@ | ||
| <h1>Edit blog post</h1> | ||
|
|
||
| <%= render partial: "form", locals: {blog_post: @blog_post} %> | ||
| <%= render partial: "form", locals: {blog_post: @blog_post} %> | ||
|
|
||
| <%= button_to "Delete", @blog_post, method: :delete, data: {turbo_confirm: "Are you sure?"} %> |
This file contains hidden or 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,2 +1,3 @@ | ||
| <%= link_to "Edit", edit_blog_post_path(@blog_post) if user_signed_in? %> | ||
| <h1><%= @blog_post.title %></h1> | ||
| <%= @blog_post.body %> |
This file contains hidden or 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,16 @@ | ||
| <h2>Resend confirmation instructions</h2> | ||
|
|
||
| <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> | ||
| <%= render "devise/shared/error_messages", resource: resource %> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :email %><br /> | ||
| <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> | ||
| </div> | ||
|
|
||
| <div class="actions"> | ||
| <%= f.submit "Resend confirmation instructions" %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <%= render "devise/shared/links" %> |
This file contains hidden or 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,5 @@ | ||
| <p>Welcome <%= @email %>!</p> | ||
|
|
||
| <p>You can confirm your account email through the link below:</p> | ||
|
|
||
| <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p> |
This file contains hidden or 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,7 @@ | ||
| <p>Hello <%= @email %>!</p> | ||
|
|
||
| <% if @resource.try(:unconfirmed_email?) %> | ||
| <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p> | ||
| <% else %> | ||
| <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p> | ||
| <% end %> |
This file contains hidden or 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,3 @@ | ||
| <p>Hello <%= @resource.email %>!</p> | ||
|
|
||
| <p>We're contacting you to notify you that your password has been changed.</p> |
This file contains hidden or 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,8 @@ | ||
| <p>Hello <%= @resource.email %>!</p> | ||
|
|
||
| <p>Someone has requested a link to change your password. You can do this through the link below.</p> | ||
|
|
||
| <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p> | ||
|
|
||
| <p>If you didn't request this, please ignore this email.</p> | ||
| <p>Your password won't change until you access the link above and create a new one.</p> |
This file contains hidden or 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,7 @@ | ||
| <p>Hello <%= @resource.email %>!</p> | ||
|
|
||
| <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p> | ||
|
|
||
| <p>Click the link below to unlock your account:</p> | ||
|
|
||
| <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p> |
This file contains hidden or 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,25 @@ | ||
| <h2>Change your password</h2> | ||
|
|
||
| <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %> | ||
| <%= render "devise/shared/error_messages", resource: resource %> | ||
| <%= f.hidden_field :reset_password_token %> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :password, "New password" %><br /> | ||
| <% if @minimum_password_length %> | ||
| <em>(<%= @minimum_password_length %> characters minimum)</em><br /> | ||
| <% end %> | ||
| <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %> | ||
| </div> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :password_confirmation, "Confirm new password" %><br /> | ||
| <%= f.password_field :password_confirmation, autocomplete: "new-password" %> | ||
| </div> | ||
|
|
||
| <div class="actions"> | ||
| <%= f.submit "Change my password" %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <%= render "devise/shared/links" %> |
This file contains hidden or 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,16 @@ | ||
| <h2>Forgot your password?</h2> | ||
|
|
||
| <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> | ||
| <%= render "devise/shared/error_messages", resource: resource %> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :email %><br /> | ||
| <%= f.email_field :email, autofocus: true, autocomplete: "email" %> | ||
| </div> | ||
|
|
||
| <div class="actions"> | ||
| <%= f.submit "Send me reset password instructions" %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <%= render "devise/shared/links" %> |
This file contains hidden or 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,43 @@ | ||
| <h2>Edit <%= resource_name.to_s.humanize %></h2> | ||
|
|
||
| <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> | ||
| <%= render "devise/shared/error_messages", resource: resource %> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :email %><br /> | ||
| <%= f.email_field :email, autofocus: true, autocomplete: "email" %> | ||
| </div> | ||
|
|
||
| <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | ||
| <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> | ||
| <% end %> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br /> | ||
| <%= f.password_field :password, autocomplete: "new-password" %> | ||
| <% if @minimum_password_length %> | ||
| <br /> | ||
| <em><%= @minimum_password_length %> characters minimum</em> | ||
| <% end %> | ||
| </div> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :password_confirmation %><br /> | ||
| <%= f.password_field :password_confirmation, autocomplete: "new-password" %> | ||
| </div> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> | ||
| <%= f.password_field :current_password, autocomplete: "current-password" %> | ||
| </div> | ||
|
|
||
| <div class="actions"> | ||
| <%= f.submit "Update" %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <h3>Cancel my account</h3> | ||
|
|
||
| <div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div> | ||
|
|
||
| <%= link_to "Back", :back %> |
This file contains hidden or 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,29 @@ | ||
| <h2>Sign up</h2> | ||
|
|
||
| <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> | ||
| <%= render "devise/shared/error_messages", resource: resource %> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :email %><br /> | ||
| <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "border" %> | ||
| </div> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :password %> | ||
| <% if @minimum_password_length %> | ||
| <em>(<%= @minimum_password_length %> characters minimum)</em> | ||
| <% end %><br /> | ||
| <%= f.password_field :password, autocomplete: "new-password", class: "border" %> | ||
| </div> | ||
|
|
||
| <div class="field"> | ||
| <%= f.label :password_confirmation %><br /> | ||
| <%= f.password_field :password_confirmation, autocomplete: "new-password", class: "border" %> | ||
| </div> | ||
|
|
||
| <div class="actions"> | ||
| <%= f.submit "Sign up!", class: "bg-gray-100 px-4 py-1 rounded hover:bg-gray-200" %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <%= render "devise/shared/links" %> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.