Sha256: 74353d851de9608af9610775fb21beeec7dce0c923ad657405c28c632a8dacc1

Contents?: true

Size: 581 Bytes

Versions: 23

Compression:

Stored size: 581 Bytes

Contents

module Extface
  class ApplicationController < ActionController::Base
    prepend_before_filter :include_extra_module
    
    def index
    end
    
    def extfaceable
      @extfaceable ||= extface_mapping.i_klass.find_by(extface_mapping.i_find_key => params[extface_mapping.i_param])
    end

    private
      def extface_mapping
        @extface_mapping ||= Extface::Mapping.find(request.fullpath)
      end
      
      def include_extra_module
        self.class.send(:include, extface_mapping.i_extra_module) if extface_mapping.i_extra_module.present?
      end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
extface-0.2.5 app/controllers/extface/application_controller.rb
extface-0.2.4 app/controllers/extface/application_controller.rb
extface-0.2.3 app/controllers/extface/application_controller.rb
extface-0.2.2 app/controllers/extface/application_controller.rb
extface-0.2.1 app/controllers/extface/application_controller.rb
extface-0.2.0 app/controllers/extface/application_controller.rb
extface-0.1.9 app/controllers/extface/application_controller.rb
extface-0.1.8 app/controllers/extface/application_controller.rb
extface-0.1.7 app/controllers/extface/application_controller.rb
extface-0.1.6 app/controllers/extface/application_controller.rb
extface-0.1.5 app/controllers/extface/application_controller.rb
extface-0.1.4 app/controllers/extface/application_controller.rb
extface-0.1.3 app/controllers/extface/application_controller.rb
extface-0.1.2 app/controllers/extface/application_controller.rb
extface-0.1.1 app/controllers/extface/application_controller.rb
extface-0.1.0 app/controllers/extface/application_controller.rb
extface-0.0.8 app/controllers/extface/application_controller.rb
extface-0.0.7 app/controllers/extface/application_controller.rb
extface-0.0.6 app/controllers/extface/application_controller.rb
extface-0.0.5 app/controllers/extface/application_controller.rb