Sha256: 5ba1da051e67e72fc909c1b8bf2b6dd4a02bf14e8e917c1a60810d5b737df850

Contents?: true

Size: 851 Bytes

Versions: 96

Compression:

Stored size: 851 Bytes

Contents

module ActiveScaffold::Config

  class Core

    cattr_accessor :advanced_search_plugin_directory
    @@advanced_search_plugin_directory = File.expand_path(__FILE__).match(/vendor\/plugins\/([^\/]*)/)[1]
    
    def template_search_path_with_advanced_search(frontend = self.frontend)
      frontends_path = "../../vendor/plugins/#{ActiveScaffold::Config::Core.advanced_search_plugin_directory}/frontends"
    
      search_path = template_search_path_without_advanced_search
      search_path << "#{frontends_path}/#{frontend}/views" if frontend.to_sym != :default
      search_path << "#{frontends_path}/default/views"
      return search_path
    end
    
    ActionController::Resources::Resource::ACTIVE_SCAFFOLD_ROUTING[:collection][:show_advanced_search] = :get
    
    alias_method_chain :template_search_path, :advanced_search

  end
  
end

Version data entries

96 entries across 96 versions & 1 rubygems

Version Path
six-updater-web-0.24.15 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.14 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.13 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.12 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.11 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.10 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.9 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.8 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.7 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.6 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.5 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.4 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.3 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.2 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.1 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.24.0 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.23.7 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.23.6 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.23.5 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb
six-updater-web-0.23.4 lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb