Commit 95df091b by liyijie

Add options resource

parent 990e40f9
...@@ -133,11 +133,11 @@ class SimpleControllerGenerator < Rails::Generators::NamedBase ...@@ -133,11 +133,11 @@ class SimpleControllerGenerator < Rails::Generators::NamedBase
end end
def resource_plural def resource_plural
resource_class&.model_name&.plural options.resource&.pluralize || resource_class&.model_name&.plural
end end
def resource_singular def resource_singular
resource_class&.model_name&.singular options.resource&.singularize || resource_class&.model_name&.singular
end end
def resource_collection def resource_collection
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment