diff --git a/config/routes.rb b/config/routes.rb index d3e2e44..b2cd6c6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -79,7 +79,7 @@ ActionController::Routing::Routes.draw do |map| map.profile_search 'profile/:profile/search', :controller => 'profile_search', :action => 'index', :profile => /#{Noosfero.identifier_format}/ # public profile information - map.profile 'profile/:profile/:action/:id', :controller => 'profile', :action => 'index', :id => /.*/, :profile => /#{Noosfero.identifier_format}/ + map.profile 'profile/:profile/:action/:id', :controller => 'profile', :action => 'index', :id => /[^\/]*/, :profile => /#{Noosfero.identifier_format}/ # contact map.contact 'contact/:profile/:action/:id', :controller => 'contact', :action => 'index', :id => /.*/, :profile => /#{Noosfero.identifier_format}/ diff --git a/lib/noosfero/plugin.rb b/lib/noosfero/plugin.rb index 33cecd8..f7f4c44 100644 --- a/lib/noosfero/plugin.rb +++ b/lib/noosfero/plugin.rb @@ -1,4 +1,6 @@ require 'noosfero' +include ActionView::Helpers::AssetTagHelper + class Noosfero::Plugin attr_accessor :context diff --git a/lib/noosfero/plugin/context.rb b/lib/noosfero/plugin/context.rb index f7c6a76..d79a01a 100644 --- a/lib/noosfero/plugin/context.rb +++ b/lib/noosfero/plugin/context.rb @@ -26,4 +26,8 @@ class Noosfero::Plugin::Context @params ||= @controller.send(:params) end + def session + @session ||= @controller.send(:session) + end + end -- libgit2 0.21.2