-
Notifications
You must be signed in to change notification settings - Fork 25
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
Review/interview show #80
base: master
Are you sure you want to change the base?
Review/interview show #80
Conversation
def call(params) | ||
result = interview_operation.call(company_id: params[:company_id].to_i) | ||
company_result = operation.call(id: params[:company_id].to_i) | ||
case result && company_result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
так нельзя делать, этот код всегда будет company_result
пропускать
по идее, ты можешь переписать это вот так:
case company_result
when Success
@company = company_result.value!
@interviews = result.value_or([])
when Failure
redirect_to routes.companies_path
end
@@ -4,7 +4,7 @@ | |||
change do | |||
alter_table :companies do | |||
add_column :interview_rating_total, Float, null: false, default: 0.0 | |||
add_column :interviews, 'jsonb', default: '{}', null: false | |||
add_column :interview_ratings, 'jsonb', default: '{}', null: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
так нельзя делать. нужно делать новую миграцию, в которой будет переименнована колонка
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
при этом, зачем тебе тут jsonb
поле?
9344c14
to
80ecead
Compare
Добавлено отображение интервью и тесты к ним