Skip to content

i-free-developer/rails-API

Repository files navigation

Rails API CRUD

  1. Add route in config/routes.rb
namespace :api, defaults: { format: :json } do
  namespace :v1 do
    resources :stories, only: [:index]      
  end
end
  1. Add action in controllers/api/v1/stories_controller.rb
def index
end
  1. Add view if needed in views/api/v1/stories/index.json.jbuilder
index.json.jbuilder

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published