Skip to content

Commit

Permalink
raise exception if the search class is not defining the correct method
Browse files Browse the repository at this point in the history
  • Loading branch information
hmcgowan committed Aug 3, 2012
1 parent 90d6c25 commit 69572c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/etapestry/search_controller.rb
@@ -1,5 +1,10 @@
module ETapestry
class SearchController < BaseController

def current_record_visible?
raise "Method needs to be defined in the subclass and return a true/false value"
end

def populate_data
super unless current_record_visible?
end
Expand Down

0 comments on commit 69572c2

Please sign in to comment.