class Jsonapi::ResourceGenerator

Public Instance Methods

create_resource() click to toggle source
# File lib/generators/jsonapi/resource_generator.rb, line 5
def create_resource
  template_file = File.join(
    'app/resources',
    class_path,
    "#{file_name.singularize}_resource.rb"
  )
  template 'jsonapi_resource.rb', template_file
end