Class: ReportTemplatesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/report_templates_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'app/controllers/report_templates_controller.rb', line 6

def index
  conditions = []
  conditions = ['report_type in (?)', parse_array(params['report_type'])] unless params['report_type'].blank?

  @templates = ReportTemplate.find(:all,
    :conditions => conditions)

  respond_to do |format|
    format.html # index.html.erb
    format.xml  { render :xml => @templates }
    format.fxml do
      render :fxml => @templates.to_fxml(
      { :include => {
        :ac_filter_def => { :include => {
          :ac_filters => { :include => :ac_filter_options}
          }}
       }
      }
    )
    end
  end

end