Go to [path of the rails applaication]/apps/config/environments/development.rb
and make a env variable as false in the file
config.action_controller.consider_all_requests_local = false(by default it will be true)
Go to [path of the rails applaication]/apps/controllers/application.rb
add the below text in above mentioned file.
def rescue_action_in_public(exception)
render :text => '[Your html body]'
end
def local_request?
false
end
Thats it .. now dont let your user know that what are you cooking in the other corner... simple na.....:)...Thanks to Raghavedra who helped me for this article