Sha256: af8bb110ba162d796e87492c08dade39b9b6c9b9e918a89ba42d7f74c14391ac

Contents?: true

Size: 339 Bytes

Versions: 2

Compression:

Stored size: 339 Bytes

Contents

module Saasable::Railties
  module Helpers
    def self.included klass
      klass.send(:include, InstanceMethods)
      klass.class_eval do
        helper_method :current_saas
      end
    end
  
    module InstanceMethods
      def current_saas
        @current_saas ||= request.env[:saasable][:current_saas]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
saasable-0.2.2 lib/saasable/railties/helpers.rb
saasable-0.2.0 lib/saasable/railties/helpers.rb