Sha256: 85cae58d70869565295b9fdb99b6675992229bf7661bf08af04132dac486172d

Contents?: true

Size: 266 Bytes

Versions: 13

Compression:

Stored size: 266 Bytes

Contents

# frozen_string_literal: true

prepend Respond, Actions

# Respond with json:
respond.with_json

# This method should return HTML, even thought this controller responds with JSON.
on 'hello-world' do
	succeed! content: "<p>Hello World</p>", :type => 'text/html'
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
utopia-2.15.1 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.15.0 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.14.0 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.13.4 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.13.3 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.13.2 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.13.1 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.13.0 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.12.4 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.12.3 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.12.2 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.12.1 spec/utopia/controller/respond_spec/html/controller.rb
utopia-2.12.0 spec/utopia/controller/respond_spec/html/controller.rb