Hi to all,
i''ve the following validation in my model:
class User < ActiveRecord::Base
acts_as_mappable :default_units => :kms,
:default_formula => :flat,
:lat_column_name => :latitudine,
:lng_column_name => :longitudine
has_many :neighborgs
has_many :blacklists
has_many :calls
validates_format_of :mac_address, :with
=>/^([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}$/i,
:on => :create,
:on => :update,
:message => "MAC ADDRESS NON CORRETTO, IL FORMATO CORRETTO
E'': 000b8209bcae "
validates_uniqueness_of :mac_address
validates_presence_of :nome, :cognome, :interno, :indirizzo,
:cap, :numero_civico, :telefono_abitazione, :password, :mac_address,
:sncpe
validates_numericality_of :numero_civico, :cap, :interno
validates_format_of :cap, :with => /^[0-9]{5}$/i,
:on => :create,
:on => :update,
:message => "INSERIRE UN CAP VALIDO!!!!"
when i insert from the web inferface a wrong value, i''m not redirected
to the web insertion page, but i see on my browser the error "Template
is missing" !!!!!!!
I really don''t know what is the problem, because all the validations
work fine!!!
thanks in advance
Andrea
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
if your validations work fine and you get a template error, then most likely the error is in the controller code (or the template is missing). could you post that? and the full error message, so we can see which template is missing... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> could you post that? and the full error message, so we can see which > template is missing...Yes, i''ve founded the problem.... My mistake, in the controller :) !!!! Thanks!!! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3 Apr 2008, at 17:16, Andrea Campagna wrote:> > > Hi to all, > > i''ve the following validation in my model: > > when i insert from the web inferface a wrong value, i''m not redirected > to the web insertion page, but i see on my browser the error "Template > is missing" !!!!!!! > > I really don''t know what is the problem, because all the validations > work fine!!!It''s probably something wrong with your controller, but you haven''t shown any of that file. Fred --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---