Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

check if ActiveRecord is defined, before trying to use it / Bugfix fo…

…r ActiveRecord less app
  • Loading branch information...
commit 2e49f7bd4a0c6b9879cd3c411e6357d5c6dd0643 1 parent 67a7ff8
@mck9 mck9 authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/validates_email_format_of.rb
View
6 lib/validates_email_format_of.rb
@@ -181,8 +181,10 @@ def validates_email_format_of(*attr_names)
end
end
else
- class ActiveRecord::Base
- extend ValidatesEmailFormatOf::Validations
+ if defined?(ActiveRecord)
+ class ActiveRecord::Base
+ extend ValidatesEmailFormatOf::Validations
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.