From 5f38014ae2c5f075b7edc0d52b92e68afa89ff0f Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Fri, 16 May 2014 13:49:46 -0300 Subject: [PATCH] rails3: fix grape initialization --- Gemfile | 4 ++++ app/models/comment.rb | 4 ++-- config.ru | 6 ++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index d210af4..fcb4297 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,10 @@ gem 'gettext', '~> 2.2.1', :require => false gem 'locale', '~> 2.0.5' gem 'whenever', :require => false gem 'eita-jrails', '>= 0.9.5', :require => 'jrails' +gem 'grape', '0.2.1' + +# FIXME list here all actual dependencies (i.e. the ones in debian/control), +# with their GEM names (not the Debian package names) # asset pipeline gem 'uglifier', '>= 1.0.3' diff --git a/app/models/comment.rb b/app/models/comment.rb index f9f747c..02c1fe3 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -21,12 +21,12 @@ class Comment < ActiveRecord::Base scope :without_reply, :conditions => ['reply_of_id IS NULL'] #FIXME make this test - named_scope :newer_than, lambda { |reference_id| + scope :newer_than, lambda { |reference_id| {:conditions => ["comments.id > #{reference_id}"]} } #FIXME make this test - named_scope :older_than, lambda { |reference_id| + scope :older_than, lambda { |reference_id| {:conditions => ["comments.id < #{reference_id}"]} } diff --git a/config.ru b/config.ru index 49a1965..636cb4a 100644 --- a/config.ru +++ b/config.ru @@ -10,11 +10,9 @@ require "config/environment" #run ActionController::Dispatcher.new rails_app = Rack::Builder.new do - use Rails::Rack::LogTailer - use Rails::Rack::Static - run ActionController::Dispatcher.new + run Noosfero::Application end - + run Rack::Cascade.new([ API::API, rails_app -- libgit2 0.21.2