Module: Saasable::Railties::Helpers::ClassMethods

Defined in:
lib/saasable/railties/helpers.rb

Instance Method Summary collapse

Instance Method Details

#saas_not_found_redirect_to(path_or_url) ⇒ Object



23
24
25
26
27
28
29
30
31
32
# File 'lib/saasable/railties/helpers.rb', line 23

def saas_not_found_redirect_to(path_or_url)
  class_eval "    private\n      def _redirect_if_saas_not_found\n        unless current_saas\n          redirect_to \"\#{path_or_url}\"\n        end\n      end\n  METHOD\nend\n", __FILE__, __LINE__ + 1

#skip_saasable(options) ⇒ Object



34
35
36
37
# File 'lib/saasable/railties/helpers.rb', line 34

def skip_saasable(options)
  skip_before_filter :_redirect_if_saas_not_found, options
  before_filter :_skip_saasable, options
end