Permalink
Browse files

Removed some cruft.

  • Loading branch information...
1 parent 385ccff commit 8a430c47da8e43d436b1d211259059775378419f @jnunemaker committed Apr 19, 2009
Showing with 0 additions and 27 deletions.
  1. +0 −1 lib/common_controller_helpers.rb
  2. +0 −26 lib/common_view_helpers.rb
@@ -1,6 +1,5 @@
module CommonControllerHelpers
def self.included(base)
- # also make this helper available to views
base.helper_method :get_all_gets
end
View
@@ -71,32 +71,6 @@ def active_class(controller_name_or_array, action_name_or_array=nil)
active_section?(controller_name_or_array, action_name_or_array) ? 'active' : ''
end
- # for use on forms and such, creates a cancel link which will append query string
- # variables and link to index
- def link_to_cancel(*reject)
- if params[:q].blank?
- link_to 'cancel', url_for(:action => 'index') + get_all_gets(:reject => reject)
- else
- link_to 'cancel', url_for(:action => 'search') + get_all_gets(:reject => reject)
- end
- end
-
- def link_to_view_all(options={})
- options.reverse_merge!(:reject => [], :class => '')
- css_class = options.delete(:class)
- reject = options.delete(:reject)
-
- if params[:q].blank?
- link_to 'View All',
- url_for(:action => 'index') + get_all_gets(:reject => reject),
- :class => css_class
- else
- link_to 'Return To Search Results',
- url_for(:action => 'search') + get_all_gets(:reject => reject),
- :class => css_class
- end
- end
-
# displays flash messages by type of message
def display_flash_messages
flash_types, string = [ :error, :warning, :notice ], ''

0 comments on commit 8a430c4

Please sign in to comment.