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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, Kindly, pls put the link. 2009/12/15 radu puspana <radupuspana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> 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 > > -- > > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > >-- Regards, Amit Kumar Sr. Software Engrr +91 9890654102 +91 9373087399 Blogsite: http://amitbaraik.blog.co.in/ This e-mail is confidential and may be legally privileged. If you are not the intended recipient, please notify the sender immediately and delete this e-mail. ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Dec 15, 2009 at 8:59 AM, radu puspana <radupuspana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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::Validatorlib/ 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? -- Leonardo Mateo. There''s no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 :( , 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 :) , radu On Dec 15, 2:28 pm, Leonardo Mateo <leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Dec 15, 2009 at 8:59 AM, radu puspana <radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > 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? > > -- > Leonardo Mateo. > There''s no place like ~-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Dec 15, 2009 at 9:32 AM, radu puspana <radupuspana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 :( ,That means that you''re starting to walk the right way, and that''s no reason to :(, so be :)> 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. :P 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. -- Leonardo Mateo. There''s no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, Make a file and put that under lib directory and call it in the model where u need with ''require'' keyword. 2009/12/15 Leonardo Mateo <leonardomateo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> On Tue, Dec 15, 2009 at 9:32 AM, radu puspana <radupuspana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > 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 :( , > That means that you''re starting to walk the right way, and that''s no > reason to :(, so be :) > > > 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. :P > 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. > > -- > Leonardo Mateo. > There''s no place like ~ > > -- > > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > >-- Regards, Amit Kumar Sr. Software Engrr +91 9890654102 +91 9373087399 Blogsite: http://amitbaraik.blog.co.in/ This e-mail is confidential and may be legally privileged. If you are not the intended recipient, please notify the sender immediately and delete this e-mail. ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Dec 15, 2:42 pm, Leonardo Mateo <leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Dec 15, 2009 at 9:32 AM, radu puspana <radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > 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 :( , > > That means that you''re starting to walk the right way, and that''s no > reason to :(, so be :)Thx for the nice thought :) i really appreciate it, never know that walking can be so hard :)> > 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. :P > 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 :( .. , radu p.a lovw the motto, (there''s no place like ~ ) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Dec 15, 2009 at 9:54 AM, radu puspana <radupuspana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Dec 15, 2:42 pm, Leonardo Mateo <leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Tue, Dec 15, 2009 at 9:32 AM, radu puspana <radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > 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 :( , >> >> That means that you''re starting to walk the right way, and that''s no >> reason to :(, so be :) > > Thx for the nice thought :) i really appreciate it, never know that > walking can be so hard :)That''s because you don''t remember when you were a baby :P> >> > 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. :P >> 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 modelsIn application.rb, put: require ''email_validate'' -- Leonardo Mateo. There''s no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 On Dec 15, 3:09 pm, Leonardo Mateo <leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Dec 15, 2009 at 9:54 AM, radu puspana <radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Dec 15, 2:42 pm, Leonardo Mateo <leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> On Tue, Dec 15, 2009 at 9:32 AM, radu puspana <radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > 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 :( , > > >> That means that you''re starting to walk the right way, and that''s no > >> reason to :(, so be :) > > > Thx for the nice thought :) i really appreciate it, never know that > > walking can be so hard :) > > That''s because you don''t remember when you were a baby :P > > > > >> > 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. :P > >> 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'' > > -- > Leonardo Mateo. > There''s no place like ~-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Dec 15, 2009 at 10:15 AM, radu puspana <radupuspana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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...Sorry, my bad, is app/controllers/application_controller.rb (Formerly known as application.rb) -- Leonardo Mateo. There''s no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
thx Leonardo, I''ll keep that in mind about application.rb :) 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 On Dec 15, 3:48 pm, Leonardo Mateo <leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Dec 15, 2009 at 10:15 AM, radu puspana <radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > 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... > > Sorry, my bad, is app/controllers/application_controller.rb (Formerly > known as application.rb) > > -- > Leonardo Mateo. > There''s no place like ~-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 On Dec 15, 3:48 pm, Leonardo Mateo <leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Dec 15, 2009 at 10:15 AM, radu puspana <radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > 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... > > Sorry, my bad, is app/controllers/application_controller.rb (Formerly > known as application.rb) > > -- > Leonardo Mateo. > There''s no place like ~-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 --- Response Headers: {"Content-Type"=>"", "Cache-Control"=>"no-cache"} On Dec 15, 4:06 pm, radu puspana <radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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... > , are any good for my problem? should i use that module, and what are > the exact steps? > > thx for all your help, > radu > > On Dec 15, 3:48 pm, Leonardo Mateo <leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Tue, Dec 15, 2009 at 10:15 AM, radu puspana <radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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... > > > Sorry, my bad, is app/controllers/application_controller.rb (Formerly > > known as application.rb) > > > -- > > Leonardo Mateo. > > There''s no place like ~-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.