test/dummy/app/controllers/home_controller.rb in bbq-0.0.4 vs test/dummy/app/controllers/home_controller.rb in bbq-0.1.0

- old
+ new

@@ -1,5 +1,7 @@ +Mime::Type.register "application/vnd.magic+json; version=2", :vnd_json_v2 + class HomeController < ApplicationController before_filter :authenticate_user!, :only => :index def index render :text => "BBQ" @@ -8,7 +10,16 @@ def miracle render :text => "MIRACLE" end def ponycorns + end + + def rainbow + @rainbow = { "wonderful" => true, "colors" => 7 } + respond_to do |format| + format.json { render :json => @rainbow } + format.vnd_json_v2 { render :json => @rainbow } + format.yaml { render :text => @rainbow.to_yaml } + end end end