Skip to content

Commit 9431399

Browse files
committed
fixing layout for api
1 parent 32e8e0b commit 9431399

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

app/controllers/api/rels_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class Api::RelsController < ApplicationController
1+
class Api::RelsController < ApiController
22
def index
33
@rels = Rel.all
44
end

app/controllers/api_controller.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class ApiController < ApplicationController
2+
layout false
3+
end

app/controllers/static_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class StaticController < ApplicationController
22
def root; end
3-
def api_root; end
3+
def api_root; render :layout => false; end
44
def newest_version
55
render :json => {:version => "1.0.0"}
66
end

0 commit comments

Comments
 (0)