inline_forms 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/inline_forms +5 -5
- data/lib/inline_forms/version.rb +1 -1
- metadata +1 -1
data/bin/inline_forms
CHANGED
|
@@ -364,11 +364,11 @@ module InlineForms
|
|
|
364
364
|
layout 'devise' if :devise_controller?
|
|
365
365
|
|
|
366
366
|
# Comment next 6 lines if you want CanCan authorization
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
rescue_from CanCan::
|
|
370
|
-
|
|
371
|
-
|
|
367
|
+
enable_authorization :unless => :devise_controller?
|
|
368
|
+
|
|
369
|
+
rescue_from CanCan::Unauthorized do |exception|
|
|
370
|
+
sign_out :user if user_signed_in?
|
|
371
|
+
redirect_to new_user_session_path, :alert => exception.message
|
|
372
372
|
end
|
|
373
373
|
|
|
374
374
|
# Uncomment next line if you want I18n (based on subdomain)
|
data/lib/inline_forms/version.rb
CHANGED