Class: IronAdmin::Generators::ResourceGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- IronAdmin::Generators::ResourceGenerator
- Defined in:
- lib/generators/iron_admin/resource/resource_generator.rb
Overview
Generator for creating new IronAdmin resource definitions.
Creates a resource file in app/iron_admin/ that configures how a model appears in the admin panel.
Instance Method Summary collapse
-
#create_resource_file ⇒ void
Creates the resource file from template.
Instance Method Details
#create_resource_file ⇒ void
This method returns an undefined value.
Creates the resource file from template.
22 23 24 |
# File 'lib/generators/iron_admin/resource/resource_generator.rb', line 22 def create_resource_file template "resource.rb.tt", File.join("app/iron_admin/resources", class_path, "#{file_name}_resource.rb") end |