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.
- data/lib/has_searcher/base.rb +1 -1
- data/lib/has_searcher/formtastic.rb +1 -1
- data/lib/has_searcher/version.rb +1 -1
- data/lib/has_searcher.rb +9 -1
- metadata +2 -2
data/lib/has_searcher/base.rb
CHANGED
@@ -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
|
10
|
+
semantic_form_for searcher_for(name), *(args << options), &proc
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
data/lib/has_searcher/version.rb
CHANGED
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
|