Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

rails routes default format json

defaults format: :json do
  resources :photos
  get :search, to: 'articles_controller#search', as: 'article_search'
end
Source by edgeguides.rubyonrails.org #
 
PREVIOUS NEXT
Tagged: #rails #routes #default #format #json
ADD COMMENT
Topic
Name
1+9 =