New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override resource generator to work with our structure better #50
Override resource generator to work with our structure better #50
Conversation
<% module_namespacing do -%> | ||
class <%= class_name.pluralize %>Controller < ApplicationController | ||
end | ||
<% end -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unterminated string meets end of file
<% module_namespacing do -%> | ||
class <%= class_name.pluralize %>Controller < ApplicationController | ||
end | ||
<% end -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unterminated string meets end of file
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name.pluralize %>Controller < ApplicationController | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token kEND
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name.pluralize %>Controller < ApplicationController | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token kEND
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name.pluralize %>Controller < ApplicationController |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tCONSTANT
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name.pluralize %>Controller < ApplicationController |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tCONSTANT
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tLT
unexpected token kDO
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tLT
unexpected token kDO
<% module_namespacing do -%> | ||
class <%= class_name %>Policy < ApplicationPolicy | ||
end | ||
<% end -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unterminated string meets end of file
<% module_namespacing do -%> | ||
class <%= class_name %>Policy < ApplicationPolicy | ||
end | ||
<% end -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unterminated string meets end of file
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name %>Policy < ApplicationPolicy | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token kEND
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name %>Policy < ApplicationPolicy | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token kEND
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name %>Policy < ApplicationPolicy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tCONSTANT
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name %>Policy < ApplicationPolicy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tCONSTANT
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tLT
unexpected token kDO
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tLT
unexpected token kDO
<% module_namespacing do -%> | ||
class <%= class_name.singularize %>Resource < JSONAPI::Resource | ||
end | ||
<% end -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unterminated string meets end of file
<% module_namespacing do -%> | ||
class <%= class_name.singularize %>Resource < JSONAPI::Resource | ||
end | ||
<% end -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unterminated string meets end of file
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name.singularize %>Resource < JSONAPI::Resource | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token kEND
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name.singularize %>Resource < JSONAPI::Resource | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token kEND
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name.singularize %>Resource < JSONAPI::Resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tCONSTANT
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> | |||
class <%= class_name.singularize %>Resource < JSONAPI::Resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tCONSTANT
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tLT
unexpected token kDO
@@ -0,0 +1,4 @@ | |||
<% module_namespacing do -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected token tLT
unexpected token kDO
return if options[:actions].present? | ||
route_config = regular_class_path.collect{ |namespace| "namespace :#{namespace} do " }.join(" ") | ||
route_config << "jsonapi_resources :#{file_name.pluralize}" | ||
route_config << " end" * regular_class_path.size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://github.com/bbatsov/ruby-style-guide#consistent-string-literals)
return if options[:actions].present? | ||
route_config = regular_class_path.collect{ |namespace| "namespace :#{namespace} do " }.join(" ") | ||
route_config << "jsonapi_resources :#{file_name.pluralize}" | ||
route_config << " end" * regular_class_path.size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://github.com/bbatsov/ruby-style-guide#consistent-string-literals)
class ApiResourceRouteGenerator < ResourceRouteGenerator | ||
def add_resource_route | ||
return if options[:actions].present? | ||
route_config = regular_class_path.collect{ |namespace| "namespace :#{namespace} do " }.join(" ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space missing to the left of {.
Line is too long. [105/80] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://github.com/bbatsov/ruby-style-guide#consistent-string-literals)
class ApiResourceRouteGenerator < ResourceRouteGenerator | ||
def add_resource_route | ||
return if options[:actions].present? | ||
route_config = regular_class_path.collect{ |namespace| "namespace :#{namespace} do " }.join(" ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space missing to the left of {.
Line is too long. [105/80] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://github.com/bbatsov/ruby-style-guide#consistent-string-literals)
No description provided.