burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

Zeus fails to find custom validators from gems #115

Open vrinek opened 12 years ago

vrinek commented 12 years ago

Snippet of the in-house gem:

module SkroutzValidators
  class EmailValidator < ActiveModel::EachValidator
    def validate_each(record, attribute, value)
      unless value =~ /some complex regexp/
        record.errors[attribute] << (options[:message] || "is not an email")
      end
    end
  end
end

Trying zeus server and navigating to any page fails with:

ArgumentError (Unknown validator: 'email'):
  <trace to where the validation is declared>
christhekeele commented 11 years ago

+1 Pretty big PITA w/out my initializers.

XORwell commented 11 years ago

+1

sideshowcoder commented 11 years ago

Is this still valid? I was trying to reproduce but wasn't able to @burke did you fix that?

estsauver commented 11 years ago

I'm getting an issue using Thoughtbot#clearance's testing middleware. They have a Clearance::Backdoor middleware that enables you to visit a path as a given user. I get different results running zeus rake from running regular rake.

I'll put together a test app tonight that demonstrates.