Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
using mongomapper with activemodel, so removed the old validation mat…
…chers in order to use the new remarkable/active_model matchers
  • Loading branch information
kaid authored and kaid committed Aug 7, 2010
1 parent cbd5dba commit 4e614cc
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 659 deletions.
2 changes: 1 addition & 1 deletion lib/remarkable/mongo_mapper/base.rb
Expand Up @@ -164,7 +164,7 @@ def assert_bad_value(model, attribute, value, error_message_to_expect=:invalid)
# Using the underlying mechanism inside ActiveRecord makes us free from # Using the underlying mechanism inside ActiveRecord makes us free from
# all thos errors. # all thos errors.
# #
# We replace {{count}} interpolation for 12345 which later is replaced # We replace %{count} interpolation for 12345 which later is replaced
# by a regexp which contains \d+. # by a regexp which contains \d+.
# #
def error_message_from_model(model, attribute, message) #:nodoc: def error_message_from_model(model, attribute, message) #:nodoc:
Expand Down
8 changes: 4 additions & 4 deletions lib/remarkable/mongo_mapper/describe.rb
Expand Up @@ -33,7 +33,7 @@ def self.after_include(target) #:nodoc:
# remarkable: # remarkable:
# mongo_mapper: # mongo_mapper:
# describe: # describe:
# each: "{{key}} is {{value}}" # each: "%{key} is %{value}"
# prepend: "when " # prepend: "when "
# connector: " and " # connector: " and "
# #
Expand Down Expand Up @@ -98,7 +98,7 @@ module ClassMethods
# remarkable: # remarkable:
# mongo_mapper: # mongo_mapper:
# describe: # describe:
# each: "{{key}} is {{value}}" # each: "%{key} is %{value}"
# prepend: "when " # prepend: "when "
# connector: " and " # connector: " and "
# #
Expand Down Expand Up @@ -126,7 +126,7 @@ def describe(*args, &block)
end end


pieces << Remarkable.t("remarkable.mongo_mapper.describe.each", pieces << Remarkable.t("remarkable.mongo_mapper.describe.each",
:default => "{{key}} is {{value}}", :default => "%{key} is %{value}",
:key => translated_key.downcase, :value => value.inspect) :key => translated_key.downcase, :value => value.inspect)
end end


Expand Down Expand Up @@ -196,4 +196,4 @@ def subject_attributes


end end
end end
end end
86 changes: 0 additions & 86 deletions lib/remarkable/mongo_mapper/matchers/allow_values_for_matcher.rb

This file was deleted.

This file was deleted.

105 changes: 0 additions & 105 deletions lib/remarkable/mongo_mapper/matchers/validate_length_of_matcher.rb

This file was deleted.

This file was deleted.

0 comments on commit 4e614cc

Please sign in to comment.