Route : self declaration and knowledge

 get '/patients/:id', to: 'patients#show'



get '/patients/:id', to: 'patients#show', as: 'patient'



resources :photos





resources :photos, :books, :videos





get 'profile', to: 'users#show'






get 'profile', action: :show, controller: 'users'







resource :geocoder
resolve('Geocoder') { [:geocoder] }









namespace :admin do
  resources :articles, :comments
end





resources :magazines do
  resources :ads
end




resources :publishers do
  resources :magazines do
    resources :photos
  end
end









resources :articles do
  resources :comments, shallow: true
end










shallow do
  resources :articles do
    resources :comments
    resources :quotes
    resources :drafts
  end
end









scope shallow_path: "sekret" do
  resources :articles do
    resources :comments, shallow: true
  end
end









scope shallow_prefix: "sekret" do
  resources :articles do
    resources :comments, shallow: true
  end
end








concern :commentable do
  resources :comments
end
 
concern :image_attachable do
  resources :images, only: :index
end






resources :photos do
  member do
    get 'preview'
  end
end





resources :photos do
  get 'preview', on: :member
end














resources :photos do
  get 'search', on: :collection
end





resources :comments do
  get 'preview', on: :new
end











get 'photos(/:id)', to: 'photos#display'




get 'photos/:id/:user_id', to: 'photos#show'






























Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5