- if pref
- render :text => pref.v.to_s
- else
- render :text => 'OH NOES! PREF NOT FOUND!', :status => 404
- end
+ render :text => pref.v.to_s
+ rescue ActiveRecord::RecordNotFound => ex
+ render :text => 'OH NOES! PREF NOT FOUND!', :status => :not_found