before_action :fetch_body
+ attr_accessor :current_user
helper_method :current_user
def authorize_web
# or raises a suitable error. +method+ should be a symbol, e.g: :put or :get.
def assert_method(method)
ok = request.send((method.to_s.downcase + "?").to_sym)
- raise OSM::APIBadMethodError.new(method) unless ok
+ raise OSM::APIBadMethodError, method unless ok
end
##
[user, pass]
end
- # used to get the current logged in user
- def current_user
- @user
- end
-
- # used to set the current logged in user
- def current_user=(user)
- @user = user
- end
-
# override to stop oauth plugin sending errors
def invalid_oauth_response; end
end