updated plan sharing to be case-insensitive#618
Merged
briri merged 3 commits intoDMPRoadmap:developmentfrom Sep 6, 2017
Merged
updated plan sharing to be case-insensitive#618briri merged 3 commits intoDMPRoadmap:developmentfrom
briri merged 3 commits intoDMPRoadmap:developmentfrom
Conversation
Contributor
Author
|
Didnt realise this was still sitting in the PR's This Now also includes an update to the default pdf settings. @sjDCC |
briri
reviewed
Sep 6, 2017
| # @param field [string] The name of the field being queried | ||
| # @param val [string] The string to search for, case insensitive | ||
| # @return [ActiveRecord::Relation] The result of the search | ||
| def self.where_case_insensitive(field, val) |
Contributor
There was a problem hiding this comment.
In Rails 5 we can move this method to the new ApplicationRecord.rb to make it available to all of the models
Contributor
|
Looks good @xsrust |
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.
Addresses #550
Adds a where_case_insensitive method to User which takes as input the field to search for, and the value to match.
Updated the roles_controller to use this new method and respond with the correct case of the user's email in the message