i have one comment controller to put comment on article
i have used this form add in my website part  or some other
controller
put two validation
   validates_presence_of(:name,:comment)
code of other controller
   @comment = Comment.new
               @commentgiven=Comment.find(:all,:conditions =>
"content_master_id=#{@content.id}")
               respond_to do |format|
                format.html {  render :file => "#{Rails.root}/app/
views/public/article.html.erb"}
                format.xml  { render :xml => @comment }
              end
        the validation error message is not showing in other
controller
any body can help me on this ..
thanks
rahul
-- 
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.
Rahul Mehta wrote:> i have one comment controller to put comment on article > i have used this form add in my website part or some other > controller > put two validation > validates_presence_of(:name,:comment) > > code of other controller > > @comment = Comment.new > @commentgiven=Comment.find(:all,:conditions => > "content_master_id=#{@content.id}") > > respond_to do |format| > format.html { render :file => "#{Rails.root}/app/ > views/public/article.html.erb"} > format.xml { render :xml => @comment } > end > > the validation error message is not showing in other > controller > any body can help me on this .. > > thanksYou are only doing new and find. Typically validations are run with save or update. Plus retrieving errors happens in erb so post that if needed.> > rahul-- 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-/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.