Commit a3659adeb7cca9e9fa6128f5e92cadfd9efec0e4
1 parent
2ad14cc2
Exists in
ratings_minor_fixes
and in
4 other branches
comment_paragraph: fix and comment conflict with core class
Showing
3 changed files
with
6 additions
and
3 deletions
Show diff stats
app/api/app.rb
@@ -61,7 +61,7 @@ module Api | @@ -61,7 +61,7 @@ module Api | ||
61 | @plugins.each do |klass| | 61 | @plugins.each do |klass| |
62 | if klass.public_methods.include? :api_mount_points | 62 | if klass.public_methods.include? :api_mount_points |
63 | klass.api_mount_points.each do |mount_class| | 63 | klass.api_mount_points.each do |mount_class| |
64 | - mount mount_class if mount_class && ( mount_class < Grape::API ) | 64 | + mount mount_class if mount_class && ( mount_class < Grape::API ) |
65 | end | 65 | end |
66 | end | 66 | end |
67 | end | 67 | end |
plugins/comment_paragraph/lib/comment_paragraph_plugin.rb
@@ -56,7 +56,7 @@ class CommentParagraphPlugin < Noosfero::Plugin | @@ -56,7 +56,7 @@ class CommentParagraphPlugin < Noosfero::Plugin | ||
56 | end | 56 | end |
57 | 57 | ||
58 | def self.api_mount_points | 58 | def self.api_mount_points |
59 | - [CommentParagraphPlugin::Api] | 59 | + [CommentParagraphPlugin::API] |
60 | end | 60 | end |
61 | 61 | ||
62 | def content_types | 62 | def content_types |
plugins/comment_paragraph/lib/comment_paragraph_plugin/api.rb
1 | -class CommentParagraphPlugin::Api < Grape::API | 1 | +# Can't be called Api as will result in: |
2 | +# warning: toplevel constant Api referenced by CommentParagraphPlugin::Api | ||
3 | +# To fix this CommentParagraphPlugin should be a module | ||
4 | +class CommentParagraphPlugin::API < Grape::API | ||
2 | MAX_PER_PAGE = 20 | 5 | MAX_PER_PAGE = 20 |
3 | 6 | ||
4 | resource :articles do | 7 | resource :articles do |