Skip to content

Instantly share code, notes, and snippets.

@zeevallin
Created April 9, 2013 01:23
Show Gist options
  • Save zeevallin/5342141 to your computer and use it in GitHub Desktop.
Save zeevallin/5342141 to your computer and use it in GitHub Desktop.
sublime
class Admin::RootController < AdminController
def index
start_at = 30.days.ago
end_at = Date.today
@first_date = (start_at.to_i * 1000)
@samples = Sample.where(:date.gte => start_at.to_date.to_s, :date.lte => end_at.to_date.to_s).order_by(date: :asc)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment