around_action :better_errors_allow_inline, :if => proc { Rails.env.development? }
attr_accessor :current_user
+
helper_method :current_user
private
def api_call_handle_error
yield
+ rescue ActionController::UnknownFormat
+ head :not_acceptable
rescue ActiveRecord::RecordNotFound => e
head :not_found
rescue LibXML::XML::Error, ArgumentError => e