Skip to content
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

In cohort view, add columns for assigned workshop/fit #19727

Merged
merged 5 commits into from Jan 4, 2018

Conversation

mehalshah
Copy link
Contributor

Left some parts unimplemented for the time being

@mehalshah mehalshah requested a review from aoby January 2, 2018 23:39
@@ -105,6 +106,10 @@ def set_type_and_year
self.application_type = nil
end

def update_accepted_date
self.accepted_at = status == 'accepted' ? Time.now : nil
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about, above on line 100

before_save :update_accepted_date, if: -> {status_changed? && accepted?}

Then this method can be simplified to:

def update_accepted_data
  self.accepted_at = Time.zone.now
end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want accepted date to be cleared if the application is un-accepted


test 'accepted_at updates times' do
time_1 = Date.today.to_time
time_2 = Date.tomorrow.to_time
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: how about today and tomorrow instead of time_1 and time_2 for clarity?

@mehalshah mehalshah merged commit 487a139 into staging Jan 4, 2018
@balderdash balderdash deleted the more_cohort_view_columns branch September 20, 2018 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants