From 5172042eb26b1169cb779b48d149c7a9a648272d Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Mon, 7 Apr 2014 20:19:59 -0300 Subject: [PATCH] remove unecessary helper for begin date definition --- lib/api/v1/articles.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/api/v1/articles.rb b/lib/api/v1/articles.rb index c1eaab0..0ba7d35 100644 --- a/lib/api/v1/articles.rb +++ b/lib/api/v1/articles.rb @@ -1,19 +1,11 @@ module API module V1 class Articles < Grape::API - before { detect_stuff_by_domain } before { authenticate! } resource :articles do - helpers do - def default_from_date - @article_created_at ||= Article.first.created_at - @article_created_at - end - end - # Collect comments from articles # # Parameters: @@ -28,7 +20,7 @@ module API until_date = DateTime.parse(params[:until]) if params[:until] if from_date.nil? - begin_period = default_from_date + begin_period = Time.at(0).to_datetime end_period = until_date.nil? ? DateTime.now : until_date else begin_period = from_date -- libgit2 0.21.2