Displaying 1 result from an estimated 1 matches for "merb_act".
Did you mean:
merb_app
2007 Jul 31
2
controller exceptions
Since Merb has the lovely property of rendering the output of an
action, using ruby-level exceptions to render error pages in Merb
could be a cute way to approach error handling.
Suppose one has an action for editing a product which you would like
to restrict to administrators:
def edit
raise AdminAccessReqired unless session[:user] and session[:user].admin?
@product =