Rails маршруты формат по умолчанию json

defaults format: :json do
  resources :photos
  get :search, to: 'articles_controller#search', as: 'article_search'
end
Comfortable Constrictor