Commit cc2c96240cc11a76d027998d4f30b90ea1aa4d47
1 parent
043bbbd1
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
rails3: fix grape initialization
Showing
3 changed files
with
6 additions
and
8 deletions
Show diff stats
Gemfile
... | ... | @@ -15,6 +15,7 @@ gem 'thin' |
15 | 15 | gem 'hpricot' |
16 | 16 | gem 'nokogiri' |
17 | 17 | gem 'rake', :require => false |
18 | +gem 'grape', '0.2.1' | |
18 | 19 | |
19 | 20 | # FIXME list here all actual dependencies (i.e. the ones in debian/control), |
20 | 21 | # with their GEM names (not the Debian package names) | ... | ... |
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
1 | 1 | # This file is used by Rack-based servers to start the application. |
2 | 2 | |
3 | 3 | require ::File.expand_path('../config/environment', __FILE__) |
4 | -run Noosfero::Application | |
5 | 4 | |
6 | 5 | rails_app = Rack::Builder.new do |
7 | - use Rails::Rack::LogTailer | |
8 | - use Rails::Rack::Static | |
9 | - run ActionController::Dispatcher.new | |
6 | + run Noosfero::Application | |
10 | 7 | end |
11 | - | |
8 | + | |
12 | 9 | run Rack::Cascade.new([ |
13 | 10 | API::API, |
14 | 11 | rails_app |
15 | -]) | |
16 | 12 | \ No newline at end of file |
13 | +]) | ... | ... |