Module: ActiveScaffold::Actions::List

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
# File 'lib/active_scaffold/actions/list.rb', line 3

def self.included(base)
  base.before_filter :list_authorized_filter, :only => [:index, :row]
  base.helper_method :list_columns
end

Instance Method Details

#indexObject



8
9
10
# File 'lib/active_scaffold/actions/list.rb', line 8

def index
  list
end

#listObject



18
19
20
21
22
23
24
# File 'lib/active_scaffold/actions/list.rb', line 18

def list
  do_list
  do_new if active_scaffold_config.list.always_show_create
  @record ||= new_model if active_scaffold_config.list.always_show_search
  @nested_auto_open = active_scaffold_config.list.nested_auto_open
  respond_to_action(:list)
end

#rowObject

get just a single row



13
14
15
16
# File 'lib/active_scaffold/actions/list.rb', line 13

def row
  @record = find_if_allowed(params[:id], :read)
  respond_to_action(:row)
end