has_searcher 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ class HasSearcher::Base < ::ApplicationController
2
2
  def self.has_searcher(base)
3
3
  base.class_eval do
4
4
  include HasSearcher::Helpers
5
- helper_method :searcher
5
+ helper_method :searcher_for
6
6
  end
7
7
 
8
8
  end
@@ -7,7 +7,7 @@ module Formtastic
7
7
  options.reverse_merge! :html => {:method => :get}
8
8
  url = params[:controller].sub(/\/\w+$/, '').split("/").map(&:underscore)
9
9
  options[:url] ||= url.push name.to_s.pluralize
10
- semantic_form_for search_object_for(name), *(args << options), &proc
10
+ semantic_form_for searcher_for(name), *(args << options), &proc
11
11
  end
12
12
  end
13
13
 
@@ -1,3 +1,3 @@
1
1
  module HasSearcher
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/has_searcher.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  module HasSearcher
2
-
2
+ autoload :Base, 'has_searcher/base'
3
+ autoload :Helpers, 'has_searcher/helpers'
3
4
  end
4
5
 
5
6
  class ActionController::Base
@@ -9,3 +10,10 @@ class ActionController::Base
9
10
  end
10
11
 
11
12
  require 'has_searcher/formtastic' rescue nil
13
+
14
+ %w{ models controllers }.each do |dir|
15
+ path = File.join(File.dirname(__FILE__), 'app', dir)
16
+ $LOAD_PATH << path
17
+ ActiveSupport::Dependencies.autoload_paths << path
18
+ ActiveSupport::Dependencies.autoload_once_paths.delete(path)
19
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dmitry Lihachev