Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
jsonapi-resources / lib / generators / jsonapi / controller_generator.rb
Size: Mime:
module Jsonapi
  class ControllerGenerator < Rails::Generators::NamedBase
    source_root File.expand_path('../templates', __FILE__)

    def create_resource
      template_file = File.join(
        'app/controllers',
        class_path,
        "#{file_name.pluralize}_controller.rb"
      )
      template 'jsonapi_controller.rb', template_file
    end
  end
end