lib/finapps/rest/sessions.rb in finapps-4.0.3 vs lib/finapps/rest/sessions.rb in finapps-4.0.4
- old
+ new
@@ -3,12 +3,13 @@
module FinApps
module REST
class Sessions < FinAppsCore::REST::Resources # :nodoc:
LOGOUT = 'logout'
- def create(params, path=nil)
+ def create(params, path = nil)
return super nil, path if path == LOGOUT
- raise FinAppsCore::InvalidArgumentsError.new 'Invalid argument: params.' unless validates params
+ raise FinAppsCore::InvalidArgumentsError, 'Invalid argument: params.' unless validates params
+
path ||= 'login'
super params, path
end