-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add CDL conditional logic #4822
Conversation
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.
This is looking really good! It doesn't look as messy as I was expecting it would have to be.
07beb7d
to
9099434
Compare
Controlled digital lending needs to be able to be turned on and off. This adds conditional checks to routes, controllers, views, etc. to enable on/off functionality.
Co-authored-by: Chris Colvard <chris.colvard@gmail.com>
9099434
to
f2ec65f
Compare
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.
Looks great!
@@ -314,7 +316,7 @@ def build_default_lending_period(collection) | |||
d.negative? ? collection.errors.add(:lending_period, "days needs to be a positive integer.") : lending_period += d.days | |||
h.negative? ? collection.errors.add(:lending_period, "hours needs to be a positive integer.") : lending_period += h.hours | |||
|
|||
flash[:error] = collection.errors.full_messages.join if collection.errors.present? | |||
flash[:error] = collection.errors.full_messages.join(' ') if collection.errors.present? |
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.
Nice catch!
No description provided.