search for: render_error

Displaying 4 results from an estimated 4 matches for "render_error".

Did you mean: render_errors
2005 Mar 10
4
error messages, loops and saves, actionmailer and finaly authentication
Thanks to everyone who responded to my first set of questions. Not only did I get my questions answered but I improved my code and learned a couple new things. I think I prefer the mailing list over IRC... easier to follow :-) I have some more questions if you don''t mind. Some are Rails related and some are Ruby related. 1) This is concerning displaying error messages. I am assuming
2006 Jun 27
0
More idiomatic way of doing this
...luding RenderError in ApplicationController. Is my approach a sound one? Also, is there a shorter and more idiomatic way of writing this: if @user.nil? render_user_exists params[:username] false else true end Rest of the code below... lib/util/render_error.rb: module RenderError def render_user_exists data render :partial => "shared/error", :system => "udb", :code => 201, :fatal => true, :message => "user exists", :property => "username",...
2006 May 02
0
Model validation when using ajax & form_remote_tag...
...essages_for no longer works ,because the page does not get reloaded. I have searched everywhere for a simple elegant solution inline with DHH " beautiful code" line. In the code for Typo they partly solve the issue by calling this method when a begin & rescue trap is called: def render_error(object = '''', status = 500) render(:text => (object.errors.full_messages.join(", ") rescue object.to_s), :status => status) end Throwing a 500 status error stops that annyoing "cannot find template" message. This just renders text to the browser....
2005 Aug 07
8
Ajax forms and redirects
Here is an example that seems perfect for Ajax that I have not seen implemented nor can figure out how to do it. I am hoping someone can give me some pointers. On the sign-up page, I would like to do my validations (password length, username uniqueness,etc ) Ajax-style. But if all validates, then redirect to the success page. The combining of redirection to a new page with Ajax is throwing me.