Files
sx-fc/app/controllers/transactions/surveys_controller.rb
yarzar_code dff2c69627 Read NFC
2020-01-12 20:07:28 +06:30

25 lines
468 B
Ruby

class Transactions::SurveysController < ApplicationController
def index
filter = params[:filter]
from = params[:from]
to = params[:to]
if filter.nil? && from.nil? && to.nil?
@surveys = Survey.all
else
@surveys = Survey.search(filter,from,to)
end
@filter = filter
@from = from
@to = to
respond_to do |format|
format.html # index.html.erb
format.xls
format.json { render json: @surveys }
end
end
end