Posts

Showing posts from August, 2023

Api Crud and search api and rspec

 routes.rb Rails.application.routes.draw do   # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html   scope :api do     # resources :users, :defaults => { :format => 'json' }       get '/users' => 'users#index', :defaults => { :format => 'json' }       get '/user/:id' => 'users#show', :defaults => { :format => 'json' }       post '/user' => 'users#create', :defaults => { :format => 'json' }       put '/user/:id' => 'users#update', :defaults => { :format => 'json' }       delete '/user/:id' => 'users#destroy', :defaults => { :format => 'json' }       get '/typeahead/:input' => 'users#search', :defaults => { :format => 'json' }   end end ========================================================================== add ApplicationControl...