diff options
Diffstat (limited to 'vendor/plugins')
-rw-r--r-- | vendor/plugins/custom_err_msg/MIT-LICENSE | 20 | ||||
-rw-r--r-- | vendor/plugins/custom_err_msg/README | 37 | ||||
-rw-r--r-- | vendor/plugins/custom_err_msg/init.rb | 1 | ||||
-rw-r--r-- | vendor/plugins/custom_err_msg/lib/custom_error_message.rb | 29 |
4 files changed, 0 insertions, 87 deletions
diff --git a/vendor/plugins/custom_err_msg/MIT-LICENSE b/vendor/plugins/custom_err_msg/MIT-LICENSE deleted file mode 100644 index 420110bde..000000000 --- a/vendor/plugins/custom_err_msg/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2006 David Easley
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file diff --git a/vendor/plugins/custom_err_msg/README b/vendor/plugins/custom_err_msg/README deleted file mode 100644 index a0488dc7a..000000000 --- a/vendor/plugins/custom_err_msg/README +++ /dev/null @@ -1,37 +0,0 @@ -Custom Error Message
-====================
-
-This plugin gives you the option to not have your custom validation error message
-prefixed with the attribute name. Ordinarily, if you have, say:
-
- validates_acceptance_of :accepted_terms, :message => 'Please accept the terms of service'
-
-You'll get the following error message:
-
- Accepted terms Please accept the terms of service
-
-This plugin allows you to omit the attribute name for specific messages. All you have to do
-is begin the message with a '^' character. Example:
-
- validates_acceptance_of :accepted_terms, :message => '^Please accept the terms of service'
-
-
-Detail
-------
-
-Redefines the ActiveRecord::Errors::full_messages method:
- Returns all the full error messages in an array. 'Base' messages are handled as usual.
- Non-base messages are prefixed with the attribute name as usual UNLESS they begin with '^'
- in which case the attribute name is omitted.
-
-
-Download
---------
-
-http://rubyforge.org/projects/custom-error-message/
-
-
-Bugs & feedback
----------------
-
-Please send bug reports, patches and feedback to David Easley at easleydp@gmail.com
diff --git a/vendor/plugins/custom_err_msg/init.rb b/vendor/plugins/custom_err_msg/init.rb deleted file mode 100644 index bec6c3021..000000000 --- a/vendor/plugins/custom_err_msg/init.rb +++ /dev/null @@ -1 +0,0 @@ -require 'custom_error_message'
diff --git a/vendor/plugins/custom_err_msg/lib/custom_error_message.rb b/vendor/plugins/custom_err_msg/lib/custom_error_message.rb deleted file mode 100644 index 4dcc459c9..000000000 --- a/vendor/plugins/custom_err_msg/lib/custom_error_message.rb +++ /dev/null @@ -1,29 +0,0 @@ -module ActiveRecord
- class Errors
-
- # Redefine the ActiveRecord::Errors::full_messages method:
- # Returns all the full error messages in an array. 'Base' messages are handled as usual.
- # Non-base messages are prefixed with the attribute name as usual UNLESS they begin with '^'
- # in which case the attribute name is omitted.
- # E.g. validates_acceptance_of :accepted_terms, :message => '^Please accept the terms of service'
- def full_messages
- full_messages = []
-
- @errors.each_key do |attr|
- @errors[attr].each do |msg|
- next if msg.nil?
-
- if attr == "base"
- full_messages << msg
- elsif msg =~ /^\^/
- full_messages << msg[1..-1]
- else
- full_messages << @base.class.human_attribute_name(attr) + " " + msg
- end
- end
- end
-
- return full_messages
- end
- end
-end
|