refactored search

This commit is contained in:
albert
2013-01-10 17:45:52 -05:00
parent 13271e9bf5
commit 8749c43b3e
85 changed files with 946 additions and 304 deletions

View File

@@ -75,6 +75,11 @@ module ApplicationHelper
submit_tag("Preview", "data-input-id" => options[:input_id], "data-preview-id" => options[:preview_id])
end
def search_field(method, options = {})
name = options[:label] || method.titleize
raw '<div class="input"><label for="search_' + method + '">' + name + '</label><input type="text" name="search_' + method + '" id="search_' + method + '"></div>'
end
protected
def nav_link_match(controller, url)
url =~ case controller