lib/roda/plugins/mailer.rb in roda-2.21.0 vs lib/roda/plugins/mailer.rb in roda-2.22.0

- old
+ new

@@ -58,11 +58,11 @@ # # In addition to allowing you to use Roda's render plugin for rendering # email bodies, you can use all of Roda's usual routing tree features # to DRY up your code: # - # r.on "albums/:d" do |album_id| + # r.on "albums", :d do |album_id| # @album = Album[album_id.to_i] # from 'from@example.com' # to 'to@example.com' # # r.mail "added" do @@ -90,10 +90,10 @@ # end # # If while preparing the email you figure out you don't want to send an # email, call +no_mail!+: # - # r.mail '/welcome/:d' do |id| + # r.mail 'welcome', :d do |id| # no_mail! unless user = User[id] # # ... # end # # By default, the mailer uses text/plain as the Content-Type for emails.