1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
Commit graph

2 commits

Author SHA1 Message Date
Konstantin Haase
1d676f41f8 Sets default content type according to template engine used instead of just text/html.
It does so by including a Mixin into the the returned string offering a content_type method. Therefore all of the following examples produce the expected results:

    # text/html
    get('/') do
      haml :index
    end

    # text/css
    get('/') do
      sass :index
    end

    # text/css
    get('/') do
      haml :index
      sass :index
    end

    # text/html
    get('/') do
      haml '= sass :index'
    end

It also allows setting the default content type for a template engine:

    set :builder, :content_type => :html

Tests and README adjustments (all languages) included.
2010-09-27 13:25:10 +02:00
Pedro Menezes
cf3c218a6c Adding scss support through specific command 2010-09-01 11:31:46 +02:00