resources :controller_name, only: [:create, :new]
get '/patients/:id', to: 'patients#show'
# url: your_site/patients/12
resources :controller_name # => new create edit update index show destroy
resources :controller_name, only: [:index, :new, :create, :edit, :update]
# <=>
resources :controller_name, except: [:destroy, :show]
resources :name_of_your_controller
Code Example |
---|
Ruby :: ruby rails activerecord to array hash |
Ruby :: ruby csv parse |
Ruby :: default value rails migration |
Ruby :: ruby decimal to hex |
Ruby :: singleton class in ruby |
Ruby :: rails check routes in console |
Ruby :: ruby is character |
Ruby :: save to csv ruby |
Ruby :: rails filter hashes by key value |
Ruby :: ruby rails controller |
Ruby :: rails secure uuid |
Ruby :: rust overwrite file |
Ruby :: ruby append to array |
Ruby :: ruby omit key |
Ruby :: get all the associations of a rails model |
Ruby :: rbenv not changing version |
Ruby :: each_cons with index ruby |
Ruby :: ruby delete method |
Ruby :: ruby generate array of numbers |
Ruby :: ruby clone vs dup |
Ruby :: JSON.parse prevent error ruby |
Ruby :: sequel alter table |
Ruby :: add key and value to first spot in hash ruby |
Ruby :: ruby get classname |
Ruby :: comment |
Ruby :: ruby method |
R :: remove package in r |
R :: reverse row order dataframe R |
R :: r rename columns |
R :: text in ggplot2 |