Class: Trackster::PageviewsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Trackster::PageviewsController
- Defined in:
- app/controllers/trackster/pageviews_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/controllers/trackster/pageviews_controller.rb', line 4 def index @pageviews = Pageview.select("url, count(*) as visits, visit_date").group(:url, :visit_date).order(:visit_date) respond_to do |format| format.html format.csv { send_data @pageviews.to_csv } end end |