-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #122. I could only run the specs by removing Gemfile.lock and would recommend #150 to be merged before this PR. Several examples were red with NoMethodErrors before I made any changes. I had to add the `value && ` to fix that. The example `does not allow a url with only a scheme` was also red. I had to add the `host.empty?` check to fix that one.
- Loading branch information
Showing
4 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'active_model/validations' | ||
|
||
class UserWithAcceptArrayWithMessage | ||
include ActiveModel::Validations | ||
|
||
attr_accessor :homepage | ||
|
||
validates :homepage, url: { accept_array: true, message: 'wrong' } | ||
end |
This file contains 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
This file contains 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