class RestRails::Generators::InstallGenerator
Public Instance Methods
basic_setup()
click to toggle source
argument :name, :type => :string, :default => “en”
# File lib/generators/rest_rails/install_generator.rb, line 9 def basic_setup # Setup Initializer template "rest_rails.rb", "config/initializers/rest_rails.rb" end
completed()
click to toggle source
# File lib/generators/rest_rails/install_generator.rb, line 19 def completed readme "README" end
setup_routes()
click to toggle source
# File lib/generators/rest_rails/install_generator.rb, line 13 def setup_routes route "mount RestRails::Engine => '/api/v1', as: 'rest'" route "# For more information, check out the gem repo: https://github.com/sergio-rivas/rest-rails" route "# Note: Make sure RestRails engine is at the BOTTOM of routes" route "# RestRails standard REST API for all models" end