diff --git a/Gemfile b/Gemfile index 49f23a6..2aada7d 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ gem 'thin' gem 'hpricot' gem 'nokogiri' gem 'rake', :require => false +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) diff --git a/app/models/comment.rb b/app/models/comment.rb index b00671e..6b2d8fe 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 6ab0ee5..4d3f4eb 100644 --- a/config.ru +++ b/config.ru @@ -1,15 +1,12 @@ # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) -run Noosfero::Application 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 -]) \ No newline at end of file +]) -- libgit2 0.21.2