Skip to content
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

Merged

Conversation

NuckChorris
Copy link
Member

No description provided.

<% module_namespacing do -%>
class <%= class_name.pluralize %>Controller < ApplicationController
end
<% end -%>

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 -%>

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

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

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

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

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 -%>

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 -%>

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 -%>

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 -%>

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

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

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

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

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 -%>

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 -%>

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 -%>

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 -%>

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

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

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

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

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 -%>

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 -%>

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

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

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(" ")

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(" ")

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)

@NuckChorris NuckChorris merged commit 9b450e7 into the-future Feb 1, 2017
@NuckChorris NuckChorris deleted the improve-generators-so-i-dont-hate-the-world branch February 1, 2017 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants