3 ms·
I don't really buy the "big win" over Sinatra ("much DRYer", no need to set ivars for each action) because you can just use a `before` block with wildcard route
by swanson 12y ago
I don't really buy the "big win" over Sinatra ("much DRYer", no need to set ivars for each action) because you can just use a `before` block with wildcard routes.
before '/artist/:id*' do
@artist = Artist[params[:id]]
end
before '/artist/:id/album/:number*' do
@album = @artist.album_with_number(params[:number])
end