radiant-reader-extension 3.0.17 → 3.0.18

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.
@@ -41,7 +41,7 @@ protected
41
41
 
42
42
  def require_reader
43
43
  unless set_reader # set_reader is added to ApplicationController and sets Reader.current while checking authentication
44
- store_location
44
+ store_location!
45
45
  raise ReaderError::LoginRequired, t('reader_extension.please_log_in')
46
46
  false
47
47
  end
@@ -56,7 +56,7 @@ protected
56
56
 
57
57
  def require_no_reader
58
58
  if set_reader
59
- store_location
59
+ store_location!
60
60
  flash[:notice] = t('reader_extension.please_log_out')
61
61
  redirect_back_or_to url_for(current_reader)
62
62
  return false
@@ -47,7 +47,7 @@ module ControllerExtensions # for inclusion into ApplicationController
47
47
  Reader.current = current_reader
48
48
  end
49
49
 
50
- def store_location(location = request.request_uri)
50
+ def store_location!(location = request.request_uri)
51
51
  session[:return_to] = location
52
52
  end
53
53
 
@@ -76,11 +76,12 @@ module ControllerExtensions # for inclusion into ApplicationController
76
76
 
77
77
  def login_required(e)
78
78
  @message = e.message
79
+ store_location!
79
80
  respond_to do |format|
80
81
  format.html {
81
82
  flash[:explanation] = t('reader_extension.reader_required')
82
83
  flash[:notice] = e.message
83
- redirect_to reader_login_url
84
+ redirect_to reader_login_url
84
85
  }
85
86
  format.js {
86
87
  @inline = true
@@ -1,5 +1,5 @@
1
1
  module RadiantReaderExtension
2
- VERSION = '3.0.17'
2
+ VERSION = '3.0.18'
3
3
  SUMMARY = %q{Reader/viewer/visitor registration, login and access-control for Radiant CMS}
4
4
  DESCRIPTION = %q{Provides reader/member/user registration and management functions including password-reminder, group-based page access control and administrative email.}
5
5
  URL = "http://radiant.spanner.org/reader"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-reader-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 37
4
+ hash: 35
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 17
10
- version: 3.0.17
9
+ - 18
10
+ version: 3.0.18
11
11
  platform: ruby
12
12
  authors:
13
13
  - William Ross
@@ -356,7 +356,7 @@ files:
356
356
  homepage: http://radiant.spanner.org/reader
357
357
  licenses: []
358
358
 
359
- post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.17'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
359
+ post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.18'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
360
360
  rdoc_options: []
361
361
 
362
362
  require_paths: