Commit 5f38014ae2c5f075b7edc0d52b92e68afa89ff0f

Authored by Victor Costa
Committed by Rodrigo Souto
1 parent b223ac66

rails3: fix grape initialization

Showing 3 changed files with 8 additions and 6 deletions   Show diff stats
Gemfile
... ... @@ -19,6 +19,10 @@ gem 'gettext', '~> 2.2.1', :require => false
19 19 gem 'locale', '~> 2.0.5'
20 20 gem 'whenever', :require => false
21 21 gem 'eita-jrails', '>= 0.9.5', :require => 'jrails'
  22 +gem 'grape', '0.2.1'
  23 +
  24 +# FIXME list here all actual dependencies (i.e. the ones in debian/control),
  25 +# with their GEM names (not the Debian package names)
22 26  
23 27 # asset pipeline
24 28 gem 'uglifier', '>= 1.0.3'
... ...
app/models/comment.rb
... ... @@ -21,12 +21,12 @@ class Comment < ActiveRecord::Base
21 21 scope :without_reply, :conditions => ['reply_of_id IS NULL']
22 22  
23 23 #FIXME make this test
24   - named_scope :newer_than, lambda { |reference_id|
  24 + scope :newer_than, lambda { |reference_id|
25 25 {:conditions => ["comments.id > #{reference_id}"]}
26 26 }
27 27  
28 28 #FIXME make this test
29   - named_scope :older_than, lambda { |reference_id|
  29 + scope :older_than, lambda { |reference_id|
30 30 {:conditions => ["comments.id < #{reference_id}"]}
31 31 }
32 32  
... ...
config.ru
... ... @@ -10,11 +10,9 @@ require &quot;config/environment&quot;
10 10 #run ActionController::Dispatcher.new
11 11  
12 12 rails_app = Rack::Builder.new do
13   - use Rails::Rack::LogTailer
14   - use Rails::Rack::Static
15   - run ActionController::Dispatcher.new
  13 + run Noosfero::Application
16 14 end
17   -
  15 +
18 16 run Rack::Cascade.new([
19 17 API::API,
20 18 rails_app
... ...