Conversation
5d8b771 to
53a6527
Compare
53a6527 to
da3f512
Compare
YJorge
reviewed
Aug 26, 2022
| task.update(task_params) | ||
|
|
||
| if task.update(task_params) | ||
| UserMailer.with({ task: task }).task_updated.deliver_now |
YJorge
reviewed
Aug 26, 2022
| task.destroy | ||
|
|
||
| if task.destroy | ||
| UserMailer.with({ task: task }).task_destroyed.deliver_now |
YJorge
reviewed
Aug 26, 2022
| require 'test_helper' | ||
|
|
||
| class UserMailerTest < ActionMailer::TestCase | ||
| test 'task created' do |
There was a problem hiding this comment.
task_updated и task_deleted тоже надо тестировать
YJorge
reviewed
Aug 26, 2022
| task = Task.first | ||
| params = { task: task } | ||
|
|
||
| UserMailer.with(params).task_updated |
YJorge
reviewed
Aug 26, 2022
| @@ -1,13 +1,37 @@ | |||
| <!DOCTYPE html> | |||
There was a problem hiding this comment.
нет необходимости использовать erb и slim. Давай остановимся на слим
YJorge
reviewed
Aug 26, 2022
| resource :board, only: :show | ||
| resource :session, only: [:new, :create, :destroy] | ||
| resources :developers, only: [:new, :create] | ||
| resource :password_reset, only: [:new, :create, :edit, :update] |
YJorge
reviewed
Aug 26, 2022
| resource :session, only: [:new, :create, :destroy] | ||
| resources :developers, only: [:new, :create] | ||
| resource :password_reset, only: [:new, :create, :edit, :update] | ||
| resource :password, only: [:edit, :update] |
YJorge
reviewed
Aug 26, 2022
| end | ||
|
|
||
| def create | ||
| @password_reset = PasswordResetForm.new(password_reset_params) |
There was a problem hiding this comment.
password_reset_form. Глобальные переменные лучше не использовать
YJorge
reviewed
Aug 26, 2022
| class AddResetToUsers < ActiveRecord::Migration[6.1] | ||
| def change | ||
| add_column :users, :reset_digest, :string | ||
| add_column :users, :reset_sent_at, :datetime |
YJorge
reviewed
Aug 26, 2022
| user.reset_sent_at.present? && (Time.current - user.reset_sent_at) <= 1.days | ||
| end | ||
|
|
||
| def self.clear_reset_digest(user) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.