Hi all, I''m new here. However, I''m so happy because I got Ruby on Rails to work on my host. Now there''s just a problem with displaying validation error message , in my view i have used the form_tag code is as follow <% form_tag ''create'', :multipart => true do %> <%= error_messages_for :content_masters %> <p> <%= label_tag :title %> <%= text_field_tag :title %> </p> content_masters is my controller name .. in my model m using validates_presence_of(:title, :message => "message") the validation message is not coming .. I hope you want to help me. Thanks -- 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 Rahul, The symbol (:content_masters) in error_messages_for should be the name of a variable, so if you wanted to display error messages for at variable called @user, you''d call it like this: <%= error_messages_for ''user'' %> Please also see http://api.rubyonrails.org/classes/ActionView/Helpers/ActiveRecordHelper.html#M001694 . /Lasse 2010/3/27 Rahul Mehta <rahul23134654-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> Hi all, > > I''m new here. However, I''m so happy because I got Ruby on Rails to > work on my host. Now there''s just a problem with displaying > validation error message , > > in my view i have used the form_tag code is as follow > > <% form_tag ''create'', :multipart => true do %> > > <%= error_messages_for :content_masters %> > <p> > <%= label_tag :title %> > <%= text_field_tag :title %> > </p> > > content_masters is my controller name .. > > in my model m using > > validates_presence_of(:title, :message => "message") > > the validation message is not coming .. > > > I hope you want to help me. > > Thanks > > -- > 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. > >-- 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 Lasse, Thanks for your concern.. if i want to validate title than <p> <%= label_tag :title %> <%= text_field_tag :title %> </p> then............................. <%= error_messages_for @title %> <%= error_messages_for :title %> i have tried both the syntax but not working do u have any idea .. thanks rahul On Mar 27, 5:42 pm, Lasse Bunk <lasseb...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Rahul, > > The symbol (:content_masters) in error_messages_for should be the name of a > variable, so if you wanted to display error messages for at variable called > @user, you''d call it like this: > > <%= error_messages_for ''user'' %> > > Please also seehttp://api.rubyonrails.org/classes/ActionView/Helpers/ActiveRecordHel... > . > > /Lasse > > 2010/3/27 Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > Hi all, > > > I''m new here. However, I''m so happy because I got Ruby on Rails to > > work on my host. Now there''s just a problem with displaying > > validation error message , > > > in my view i have used the form_tag code is as follow > > > <% form_tag ''create'', :multipart => true do %> > > > <%= error_messages_for :content_masters %> > > <p> > > <%= label_tag :title %> > > <%= text_field_tag :title %> > > </p> > > > content_masters is my controller name .. > > > in my model m using > > > validates_presence_of(:title, :message => "message") > > > the validation message is not coming .. > > > I hope you want to help me. > > > Thanks > > > -- > > 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.-- 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, I think you should use *error_message_on(object, method)* if you want to show the error of one specified field, like ''title'', ''description'' and use *error_messages_for(object)* if you want to show all the validation errors in this object On Sat, Mar 27, 2010 at 8:33 PM, Rahul Mehta <rahul23134654-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Hi all, > > I''m new here. However, I''m so happy because I got Ruby on Rails to > work on my host. Now there''s just a problem with displaying > validation error message , > > in my view i have used the form_tag code is as follow > > <% form_tag ''create'', :multipart => true do %> > > <%= error_messages_for :content_masters %> > <p> > <%= label_tag :title %> > <%= text_field_tag :title %> > </p> > > content_masters is my controller name .. > > in my model m using > > validates_presence_of(:title, :message => "message") > > the validation message is not coming .. > > > I hope you want to help me. > > Thanks > > -- > 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. > >-- 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 27 March 2010 12:33, Rahul Mehta <rahul23134654-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > I''m new here. However, I''m so happy because I got Ruby on Rails to > work on my host. Now there''s just a problem with displaying > validation error message , > > in my view i have used the form_tag code is as follow > > <% form_tag ''create'', :multipart => true do %> > > <%= error_messages_for :content_masters %> > <p> > <%= label_tag :title %> > <%= text_field_tag :title %> > </p> > > content_masters is my controller name .. > > in my model m using > > validates_presence_of(:title, :message => "message") > > the validation message is not coming ..Have a look at the rails guides at http://guides.rubyonrails.org/. The getting started guide shows how to use form_for, which is better than form_for in most cases, and includes display of error messages. Also the guide on debugging shows ways of debugging your app if it is not performing as expected. The other guides should be read also. Colin -- 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.
im also new to rails if u have good materials to learn rails please tell me send me links thanks... On Mar 27, 5:33 am, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > I''m new here. However, I''m so happy because I got Ruby on Rails to > work on my host. Now there''s just a problem with displaying > validation error message , > > in my view i have used the form_tag code is as follow > > <% form_tag ''create'', :multipart => true do %> > > <%= error_messages_for :content_masters %> > <p> > <%= label_tag :title %> > <%= text_field_tag :title %> > </p> > > content_masters is my controller name .. > > in my model m using > > validates_presence_of(:title, :message => "message") > > the validation message is not coming .. > > I hope you want to help me. > > Thanks-- 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.
Hii Yong, As i have given the syntax above would you tell me what is the syntax i used because i have tried so much but its not working... thanks rahul On Mar 27, 6:01 pm, Yong Gu <zerogy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I think you should use *error_message_on(object, method)* if you want to > show the error of one specified field, like ''title'', ''description'' > > and use *error_messages_for(object)* if you want to show all the validation > errors in this object > > On Sat, Mar 27, 2010 at 8:33 PM, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > > > Hi all, > > > I''m new here. However, I''m so happy because I got Ruby on Rails to > > work on my host. Now there''s just a problem with displaying > > validation error message , > > > in my view i have used the form_tag code is as follow > > > <% form_tag ''create'', :multipart => true do %> > > > <%= error_messages_for :content_masters %> > > <p> > > <%= label_tag :title %> > > <%= text_field_tag :title %> > > </p> > > > content_masters is my controller name .. > > > in my model m using > > > validates_presence_of(:title, :message => "message") > > > the validation message is not coming .. > > > I hope you want to help me. > > > Thanks > > > -- > > 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.-- 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.
Can Any Body Help me....... On Mar 28, 2:38 am, sachiguns <sachig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> im also new to rails if u have good materials to learn rails please > tell me > send me links > thanks... > > On Mar 27, 5:33 am, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi all, > > > I''m new here. However, I''m so happy because I got Ruby on Rails to > > work on my host. Now there''s just a problem with displaying > > validation error message , > > > in my view i have used the form_tag code is as follow > > > <% form_tag ''create'', :multipart => true do %> > > > <%= error_messages_for :content_masters %> > > <p> > > <%= label_tag :title %> > > <%= text_field_tag :title %> > > </p> > > > content_masters is my controller name .. > > > in my model m using > > > validates_presence_of(:title, :message => "message") > > > the validation message is not coming .. > > > I hope you want to help me. > > > Thanks > >-- 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.
Could you please paste your update code again? On Tue, Mar 30, 2010 at 3:16 PM, Rahul Mehta <rahul23134654-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Can Any Body Help me....... > > On Mar 28, 2:38 am, sachiguns <sachig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > im also new to rails if u have good materials to learn rails please > > tell me > > send me links > > thanks... > > > > On Mar 27, 5:33 am, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi all, > > > > > I''m new here. However, I''m so happy because I got Ruby on Rails to > > > work on my host. Now there''s just a problem with displaying > > > validation error message , > > > > > in my view i have used the form_tag code is as follow > > > > > <% form_tag ''create'', :multipart => true do %> > > > > > <%= error_messages_for :content_masters %> > > > <p> > > > <%= label_tag :title %> > > > <%= text_field_tag :title %> > > > </p> > > > > > content_masters is my controller name .. > > > > > in my model m using > > > > > validates_presence_of(:title, :message => "message") > > > > > the validation message is not coming .. > > > > > I hope you want to help me. > > > > > Thanks > > > > > > -- > 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. > >-- 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.
<% form_tag ''create'', :multipart => true do %> <%= error_messages_for :content_masters %> <p> <%= label_tag :title %> <%= text_field_tag :title %> </p> in my model m using validates_presence_of(:title, :message => "message") On Mar 30, 12:19 pm, Yong Gu <zerogy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Could you please paste your update code again? > > On Tue, Mar 30, 2010 at 3:16 PM, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > > > Can Any Body Help me....... > > > On Mar 28, 2:38 am, sachiguns <sachig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > im also new to rails if u have good materials to learn rails please > > > tell me > > > send me links > > > thanks... > > > > On Mar 27, 5:33 am, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi all, > > > > > I''m new here. However, I''m so happy because I got Ruby on Rails to > > > > work on my host. Now there''s just a problem with displaying > > > > validation error message , > > > > > in my view i have used the form_tag code is as follow > > > > > <% form_tag ''create'', :multipart => true do %> > > > > > <%= error_messages_for :content_masters %> > > > > <p> > > > > <%= label_tag :title %> > > > > <%= text_field_tag :title %> > > > > </p> > > > > > content_masters is my controller name .. > > > > > in my model m using > > > > > validates_presence_of(:title, :message => "message") > > > > > the validation message is not coming .. > > > > > I hope you want to help me. > > > > > Thanks > > > -- > > 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. > >-- 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.
try <%= error_messages_for :content_master %>, if content_master is validated in your controller if it does not work, could also please paste the code in the controller On Tue, Mar 30, 2010 at 3:21 PM, Rahul Mehta <rahul23134654-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> <% form_tag ''create'', :multipart => true do %> > > <%= error_messages_for :content_masters %> > <p> > <%= label_tag :title %> > <%= text_field_tag :title %> > </p> > in my model m using > > validates_presence_of(:title, :message => "message") > > > On Mar 30, 12:19 pm, Yong Gu <zerogy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Could you please paste your update code again? > > > > On Tue, Mar 30, 2010 at 3:16 PM, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > >wrote: > > > > > Can Any Body Help me....... > > > > > On Mar 28, 2:38 am, sachiguns <sachig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > im also new to rails if u have good materials to learn rails please > > > > tell me > > > > send me links > > > > thanks... > > > > > > On Mar 27, 5:33 am, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Hi all, > > > > > > > I''m new here. However, I''m so happy because I got Ruby on Rails to > > > > > work on my host. Now there''s just a problem with displaying > > > > > validation error message , > > > > > > > in my view i have used the form_tag code is as follow > > > > > > > <% form_tag ''create'', :multipart => true do %> > > > > > > > <%= error_messages_for :content_masters %> > > > > > <p> > > > > > <%= label_tag :title %> > > > > > <%= text_field_tag :title %> > > > > > </p> > > > > > > > content_masters is my controller name .. > > > > > > > in my model m using > > > > > > > validates_presence_of(:title, :message => "message") > > > > > > > the validation message is not coming .. > > > > > > > I hope you want to help me. > > > > > > > Thanks > > > > > -- > > > 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<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > <rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > > > -- > 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. > >-- 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.
def new @content_master = ContentMaster.new @metadata = @content_master.build_metadata respond_to do |format| format.html # new.html.erb format.xml { render :xml => @content_master } end end On Mar 30, 12:25 pm, Yong Gu <zerogy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> try <%= error_messages_for :content_master %>, if content_master is > validated in your controller > > if it does not work, could also please paste the code in the controller > > On Tue, Mar 30, 2010 at 3:21 PM, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > > > <% form_tag ''create'', :multipart => true do %> > > > <%= error_messages_for :content_masters %> > > <p> > > <%= label_tag :title %> > > <%= text_field_tag :title %> > > </p> > > in my model m using > > > validates_presence_of(:title, :message => "message") > > > On Mar 30, 12:19 pm, Yong Gu <zerogy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Could you please paste your update code again? > > > > On Tue, Mar 30, 2010 at 3:16 PM, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > >wrote: > > > > > Can Any Body Help me....... > > > > > On Mar 28, 2:38 am, sachiguns <sachig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > im also new to rails if u have good materials to learn rails please > > > > > tell me > > > > > send me links > > > > > thanks... > > > > > > On Mar 27, 5:33 am, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Hi all, > > > > > > > I''m new here. However, I''m so happy because I got Ruby on Rails to > > > > > > work on my host. Now there''s just a problem with displaying > > > > > > validation error message , > > > > > > > in my view i have used the form_tag code is as follow > > > > > > > <% form_tag ''create'', :multipart => true do %> > > > > > > > <%= error_messages_for :content_masters %> > > > > > > <p> > > > > > > <%= label_tag :title %> > > > > > > <%= text_field_tag :title %> > > > > > > </p> > > > > > > > content_masters is my controller name .. > > > > > > > in my model m using > > > > > > > validates_presence_of(:title, :message => "message") > > > > > > > the validation message is not coming .. > > > > > > > I hope you want to help me. > > > > > > > Thanks > > > > > -- > > > > 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@googlegroups.com > > . > > > > To unsubscribe from this group, send email to > > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > <rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > > 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. > >-- 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.
Thanks yong the above code got worked.............. thanks a lottttttttt... On Mar 30, 12:25 pm, Yong Gu <zerogy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> try <%= error_messages_for :content_master %>, if content_master is > validated in your controller > > if it does not work, could also please paste the code in the controller > > On Tue, Mar 30, 2010 at 3:21 PM, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > > > <% form_tag ''create'', :multipart => true do %> > > > <%= error_messages_for :content_masters %> > > <p> > > <%= label_tag :title %> > > <%= text_field_tag :title %> > > </p> > > in my model m using > > > validates_presence_of(:title, :message => "message") > > > On Mar 30, 12:19 pm, Yong Gu <zerogy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Could you please paste your update code again? > > > > On Tue, Mar 30, 2010 at 3:16 PM, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > >wrote: > > > > > Can Any Body Help me....... > > > > > On Mar 28, 2:38 am, sachiguns <sachig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > im also new to rails if u have good materials to learn rails please > > > > > tell me > > > > > send me links > > > > > thanks... > > > > > > On Mar 27, 5:33 am, Rahul Mehta <rahul23134...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Hi all, > > > > > > > I''m new here. However, I''m so happy because I got Ruby on Rails to > > > > > > work on my host. Now there''s just a problem with displaying > > > > > > validation error message , > > > > > > > in my view i have used the form_tag code is as follow > > > > > > > <% form_tag ''create'', :multipart => true do %> > > > > > > > <%= error_messages_for :content_masters %> > > > > > > <p> > > > > > > <%= label_tag :title %> > > > > > > <%= text_field_tag :title %> > > > > > > </p> > > > > > > > content_masters is my controller name .. > > > > > > > in my model m using > > > > > > > validates_presence_of(:title, :message => "message") > > > > > > > the validation message is not coming .. > > > > > > > I hope you want to help me. > > > > > > > Thanks > > > > > -- > > > > 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@googlegroups.com > > . > > > > To unsubscribe from this group, send email to > > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > <rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > > 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. > >-- 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.