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

Add CDL conditional logic #4822

Merged
merged 3 commits into from
Aug 12, 2022
Merged

Add CDL conditional logic #4822

merged 3 commits into from
Aug 12, 2022

Conversation

masaball
Copy link
Contributor

@masaball masaball commented Aug 8, 2022

No description provided.

Copy link
Member

@cjcolvar cjcolvar left a 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.

masaball and others added 3 commits August 12, 2022 11:21
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>
Copy link
Member

@cjcolvar cjcolvar left a 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?
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch!

@cjcolvar cjcolvar merged commit 9ab4b56 into develop Aug 12, 2022
@cjcolvar cjcolvar deleted the cdl_conditional branch August 12, 2022 19:59
@cjcolvar cjcolvar mentioned this pull request Nov 29, 2022
26 tasks
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.

2 participants