Authlogic::Session::Activation::NotActivatedError in Catalog#index
Showing vendor/plugins/blacklight/app/views/catalog/_bookmark_control.html.erb where line #1 raised:
You must activate the Authlogic::Session::Base.controller with a controller object before creating objects
Extracted source (around line #1):
1: <% if current_user and current_user.document_is_bookmarked? document[:id] %>
2: <span>This item is in your <%= link_to 'bookmarks', bookmarks_path %></span>
3: <% elsif current_user %>
4: <%- @bookmark ||= Bookmark.new -%>
Trace of template inclusion: vendor/plugins/blacklight/app/views/catalog/_document_list.html.erb, vendor/plugins/blacklight/app/views/catalog/index.html.erb
=====================================
I've monkey patched my copy to comment out the following in the plugin's application_controller.rb:
def current_user_session
return @current_user_session if defined?(@current_user_session)
#@current_user_session = UserSession.find
end
def current_user
return @current_user if defined?(@current_user)
#@current_user = current_user_session && current_user_session.user
end
When application_controller.rb from the plugin is copied to the rails application level leaving @current_user uncommented works. For some reason it only fails for the version inside the plugin.
I should also say that it works uncommented on one machine but not on another. The machine where it is not working is running Ruby Enterprise Edition.
Description
I get this error with latest out of trunk:
Authlogic::Session::Activation::NotActivatedError in Catalog#index
Showing vendor/plugins/blacklight/app/views/catalog/_bookmark_control.html.erb where line #1 raised:
You must activate the Authlogic::Session::Base.controller with a controller object before creating objects
Extracted source (around line #1):
1: <% if current_user and current_user.document_is_bookmarked? document[:id] %>
2: <span>This item is in your <%= link_to 'bookmarks', bookmarks_path %></span>
3: <% elsif current_user %>
4: <%- @bookmark ||= Bookmark.new -%>
Trace of template inclusion: vendor/plugins/blacklight/app/views/catalog/_document_list.html.erb, vendor/plugins/blacklight/app/views/catalog/index.html.erb
=====================================
I've monkey patched my copy to comment out the following in the plugin's application_controller.rb:
def current_user_session
return @current_user_session if defined?(@current_user_session)
#@current_user_session = UserSession.find
end
def current_user
return @current_user if defined?(@current_user)
#@current_user = current_user_session && current_user_session.user
end
When application_controller.rb from the plugin is copied to the rails application level leaving @current_user uncommented works. For some reason it only fails for the version inside the plugin.
I should also say that it works uncommented on one machine but not on another. The machine where it is not working is running Ruby Enterprise Edition.