Wynn Netherland changelog.com/posts

Sinatra 1.2 is out

Sinatra 1.2 is out and thanks to R. Konstantin Haase and others, The Chairman has added a number of ditties to his set list. Highlights of the release include:

  • Slim support
  • Inline Markaby
  • Layout engines, so you can have a layout in Haml and templates in ERb for instance
  • Conditional before, after filters
  • URL helper
  • Templates with different scopes
  • Configurable template lookup

For Ruby 1.9 users, you can now use named captures in your routes:

get %r{/(?<year>d{4})/(?<month>d{2})/(?<day>d{2})/?} do
  date = Date.new params[:year].to_i, params[:month].to_i, params[:day].to_i
  @posts = Post.pubished_on date
  erb :posts

As Sinatra fans, we’re excited about this release anxious to see what projects like Padrino and NestaCMS can do with it.

[Source on GitHub] [Announcement] [Web site]


Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00