mailinglist.rb/lib/web/mailinglists.rb

10 lines
279 B
Ruby

get "/" do
mailinglists = Mailinglist.where(strategy: %w[free validated]).all
slim :index, locals: {mailinglists:}
end
get "/mailinglist/:id" do
mailinglist = Mailinglist.first(id: params[:id], strategy: %w[free validated])
slim :mailinglist, locals: {mailinglist:}
end