Module: ActiveScaffold::Actions::PrintList

Includes:
PrintBase, Search
Defined in:
lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/print_list.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Search

#reset_search, #reset_search_session_info, #search_session_info, #store_params_into_search_session_info

Class Method Details

.included(base) ⇒ Object



6
7
8
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/print_list.rb', line 6

def self.included(base)
  base.before_filter :print_list_authorized_filter, :only => [:print_list]
end

Instance Method Details



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/print_list.rb', line 10

def print_list
  do_print_list active_scaffold_config.print_list

  respond_to do |type|
    type.html {
      render(:partial => 'print_list', :layout => false)
    }
    # not working
    # type.pdf {
    #   @html = render_to_string(:partial => "print_list.html.erb", :layout => false)
    #   prawnto :prawn => {:page_layout => :landscape}, :inline => true
    #   render :layout => false
    # }
    type.xml { render :xml => response_object.to_xml, :content_type => Mime::XML, :status => response_status }
    type.json { render :text => response_object.to_json, :content_type => Mime::JSON, :status => response_status }
    type.yaml { render :text => response_object.to_yaml, :content_type => Mime::YAML, :status => response_status }
  end
end