Module: ActiveScaffold::Actions::Mark

Defined in:
lib/active_scaffold/actions/mark.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
# File 'lib/active_scaffold/actions/mark.rb', line 4

def self.included(base)
  base.before_filter :mark_authorized?, :only => [:mark_all]
  base.prepend_before_filter :assign_marked_records_to_model
  base.helper_method :marked_records
end

Instance Method Details

#mark_allObject



10
11
12
13
14
15
16
17
# File 'lib/active_scaffold/actions/mark.rb', line 10

def mark_all
  if mark_all?
    do_mark_all
  else
    do_demark_all
  end
  respond_to_action(:mark_all)
end