where to put this class??

Greetings,

i came across this site, and i am trying to solve a problem..
Where the hell should this class go, in which dir/file of my app,
class EmailValidator < ActiveRecord::Validator

here is the link to the site so you can get the full picture(just the
first chunk of code)

many thx in return,
radu

Hi,
Kindly, pls put the link.

Greetings,

i came across this site, and i am trying to solve a problem..
Where the hell should this class go, in which dir/file of my app,
class EmailValidator < ActiveRecord::Validator

lib/ would be just fine.

here is the link to the site so you can get the full picture(just the
first chunk of code)

Where?

sry folks, i forgot to put up the link, sry my bad :
http://ryandaigle.com/articles/2009/8/11/what-s-new-in-edge-rails-independent-model-validators
thx to Leonardo Mateo for answering, and i would like the next
response if it comes, to be a well explained one, i;m a RoR noob :frowning: ,
like, if i put the code in the lib/ should i create a file or somentih
with that class, and how should i link it with the validator in my
model??

many thx yet again :slight_smile: ,
radu

sry folks, i forgot to put up the link, sry my bad :
http://ryandaigle.com/articles/2009/8/11/what-s-new-in-edge-rails-independent-model-validators
thx to Leonardo Mateo for answering, and i would like the next
response if it comes, to be a well explained one,
i;m a RoR noob :frowning: ,

That means that you're starting to walk the right way, and that's no
reason to :(, so be :slight_smile:

like, if i put the code in the lib/ should i create a file or somentih
with that class, and how should i link it with the validator in my
model??

Of course you should create a file, you can't just throw the code in a
directory unless it is on a file. :stuck_out_tongue:
After that you should make sure that file is 'required' before you try
to use it. For this you can require it on the model you're going to
use it or, you can require it on application.rb for it to be available
for all the models. That will depend on your desing.

Hope it helps.

Hi,

Make a file and put that under lib directory and call it in the model where u need with ‘require’ keyword.

> sry folks, i forgot to put up the link, sry my bad :
>http://ryandaigle.com/articles/2009/8/11/what-s-new-in-edge-rails-ind
> thx to Leonardo Mateo for answering, and i would like the next
> response if it comes, to be a well explained one,
>i;m a RoR noob :frowning: ,

That means that you're starting to walk the right way, and that's no
reason to :(, so be :slight_smile:

Thx for the nice thought :slight_smile: i really appreciate it, never know that
walking can be so hard :slight_smile:

> like, if i put the code in the lib/ should i create a file or somentih
> with that class, and how should i link it with the validator in my
> model??

Of course you should create a file, you can't just throw the code in a
directory unless it is on a file. :stuck_out_tongue:
After that you should make sure that file is 'required' before you try
to use it. For this you can require it on the model you're going to
use it or, you can require it on application.rb for it to be available
for all the models. That will depend on your desing.

so i put the class EmailValidator < ActiveRecodr::validate in a file
called say, email_validate in the lib directory?
after that pls tell me the steps to make this class and it;s method,
available to all my models

Hope it helps.

--
Leonardo Mateo.
There's no place like ~

sry for being so noob :frowning: .. ,
radu
p.a lovw the motto, (there's no place like ~ )

> sry folks, i forgot to put up the link, sry my bad :
>http://ryandaigle.com/articles/2009/8/11/what-s-new-in-edge-rails-ind
> thx to Leonardo Mateo for answering, and i would like the next
> response if it comes, to be a well explained one,
>i;m a RoR noob :frowning: ,

That means that you're starting to walk the right way, and that's no
reason to :(, so be :slight_smile:

Thx for the nice thought :slight_smile: i really appreciate it, never know that
walking can be so hard :slight_smile:

That's because you don't remember when you were a baby :stuck_out_tongue:

> like, if i put the code in the lib/ should i create a file or somentih
> with that class, and how should i link it with the validator in my
> model??

Of course you should create a file, you can't just throw the code in a
directory unless it is on a file. :stuck_out_tongue:
After that you should make sure that file is 'required' before you try
to use it. For this you can require it on the model you're going to
use it or, you can require it on application.rb for it to be available
for all the models. That will depend on your desing.

so i put the class EmailValidator < ActiveRecodr::validate in a file
called say, email_validate in the lib directory?

lib/email_validate.rb

after that pls tell me the steps to make this class and it;s method,
available to all my models

In application.rb, put:
require 'email_validate'

i can't find application.rb...
my rails app is called shope, and in this directory i can't find
shope.rb or application.rb anywhere...

sry for taking so much of your time....
the noob...
radui

Sorry, my bad, is app/controllers/application_controller.rb (Formerly
known as application.rb)

thx Leonardo, I'll keep that in mind about application.rb :slight_smile:
thx for your help.
i haven't tested yet, i still have to write some cod for the method of
the sumnit button on the form where the emai field is.
i'll let you know if it worked

thx for finding so much time to help a noob,
really really appreciate it,
radu

still have one question though.. is the regexp in that example a good
regexp for emails nowadays?
and if it isn't could someone tell me if any of this regexps on this
site, http://www.rorsecurity.info/journal/2007/4/16/ruby-regular-expression-fun.html#comments
, are any good for my problem? should i use that module, and what are
the exact steps?

thx for all your help,
radu

hi,
so in lib/email_validator i have this code
class EmailValidator < ActiveRecord::Validator
  def validate()
    record.errors[:email] << "is not valid" unless
      record.email =~ /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
  end
end

in my order module i have this code:
class Order < ActiveRecord::Base

    PAYMENT_TYPES = [
        #Displayed stored in db
        ["Check" , "check"],
        ["Credit card", "credit card"],
        ["Purchase order", "purchase order"]
    ]

validates_presence_of :name, :surname, :adress, :telephone, :email, :pay_type
    validates_inclusion_of :pay_type, :in => PAYMENT_TYPES.map{|disp,
value> value}
    validates_with EmailValidator
    has_many :line_items

end

and i have an action save_order ,in the sore_controller.rb, with just
a redirect to the same page where i have my form

when i press the submit button it triggers the action described above
the i get this error : what the heck is wrong !
thx in advance,
radu

NameError in StoreController#save_order

uninitialized constant ActiveRecord::Validator

RAILS_ROOT: /home/radup/licenta/shope
Application Trace | Framework Trace | Full Trace

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:440:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:80:in `const_missing'
/home/radup/licenta/shope/lib/email_validator.rb:1
/home/radup/licenta/shope/app/controllers/application_controller.rb:6
/home/radup/licenta/shope/app/controllers/store_controller.rb:1

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:440:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:80:in `const_missing'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:156:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:156:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:380:in `load_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:380:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:379:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:259:in `require_or_load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:425:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:80:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:92:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:380:in `load_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:380:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:379:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:259:in `require_or_load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:425:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:80:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:92:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
inflector.rb:361:in `constantize'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
inflector.rb:360:in `each'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
inflector.rb:360:in `constantize'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
core_ext/string/inflections.rb:162:in `constantize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
routing/route_set.rb:443:in `recognize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
routing/route_set.rb:436:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:87:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:121:in `_call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:130:in `build_middleware_stack'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:
24:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
params_parser.rb:15:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
session/abstract_store.rb:122:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:9:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:28:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
failsafe.rb:26:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in
`synchronize'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:114:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
reloader.rb:34:in `run'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:108:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/static.rb:31:in
`call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:46:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `each'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/log_tailer.rb:
17:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:
13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
`call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:
61:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:
34:in `run'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:111
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
script/server:3

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:440:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:80:in `const_missing'
/home/radup/licenta/shope/lib/email_validator.rb:1
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:156:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:156:in `require'
/home/radup/licenta/shope/app/controllers/application_controller.rb:6
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:380:in `load_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:380:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:379:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:259:in `require_or_load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:425:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:80:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:92:in `const_missing'
/home/radup/licenta/shope/app/controllers/store_controller.rb:1
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:380:in `load_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:380:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:379:in `load_file'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:259:in `require_or_load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:425:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:80:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:92:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
inflector.rb:361:in `constantize'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
inflector.rb:360:in `each'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
inflector.rb:360:in `constantize'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
core_ext/string/inflections.rb:162:in `constantize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
routing/route_set.rb:443:in `recognize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
routing/route_set.rb:436:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:87:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:121:in `_call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:130:in `build_middleware_stack'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:
24:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
params_parser.rb:15:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
session/abstract_store.rb:122:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:9:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:28:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
failsafe.rb:26:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in
`synchronize'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:114:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
reloader.rb:34:in `run'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:108:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/static.rb:31:in
`call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:46:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `each'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/log_tailer.rb:
17:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:
13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
`call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:
61:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:
34:in `run'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:111
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
script/server:3

This error occurred while loading the following files:
   email_validator

Request

Parameters:

{"authenticity_token"=>"OjmfqtPU85cBRlKVC7Whyjn8+R5QKqdvg00cCn/tIlM=",
"order"=>{"name"=>"dfsd",
"adress"=>"vcvc",
"pay_type"=>"check",
"telephone"=>"212121",
"surname"=>"fsdfs",
"email"=>"21"}}

Show session dump