Ruby on Rails - where to write business logic while processing a request? (newbie)
- by Genadinik
I am learning Ruby on Rails. I made a simple link like this:
<%= link_to "Alex Link", alexes_path(@alex) %>
then I routed it in routes.rb like this:
resources :alexes
get "home/index"
then I am a bit unclear, but I think it goes to this part of the controller:
def index
#@alexes = Alex.all
respond_to do |format|
…