Displaying 1 result from an estimated 1 matches for "render_user_exists".
2006 Jun 27
0
More idiomatic way of doing this
...er
exists and renders XML if not. Most of the controllers will be
returning XML on some error or other so I''m including 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,...