Permalink
Browse files

Make vanity_identity method private on controller; ensure no default …

…route
  • Loading branch information...
1 parent b699c2d commit b066384ff263580152d2f1d79cbd4066636d71bd Ariel Salomon committed Aug 30, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/vanity/experiment/base.rb
  2. +1 −0 lib/vanity/frameworks/rails.rb
@@ -181,7 +181,7 @@ def identity
def default_identify(context)
raise "No Vanity.context" unless context
raise "Vanity.context does not respond to vanity_identity" unless context.respond_to?(:vanity_identity)
- context.vanity_identity or raise "Vanity.context.vanity_identity - no identity"
+ context.send(:vanity_identity) or raise "Vanity.context.vanity_identity - no identity"
end
# Derived classes call this after state changes that may lead to
@@ -61,6 +61,7 @@ def use_vanity(symbol = nil, &block)
end
end
end
+ protected :vanity_identity
around_filter :vanity_context_filter
before_filter :vanity_reload_filter unless ::Rails.configuration.cache_classes
before_filter :vanity_query_parameter_filter

0 comments on commit b066384

Please sign in to comment.