Skip to content

Commit 6294c01

Browse files
committed
Merge pull request Apipie#425 from halilim/fix-layout-path
Fix layout path (Rails 4.2.5.1 compatibility)
2 parents d696353 + 25a5de6 commit 6294c01

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Gemfile.rails42

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"
22

33
gemspec
44

5-
gem 'rails', '~> 4.2.5'
5+
gem 'rails', '~> 4.2.5.1'

lib/tasks/apipie.rake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ namespace :apipie do
105105
else
106106
File.expand_path("../../../app/views/apipie/apipies", __FILE__)
107107
end
108-
@apipie_renderer = ActionView::Base.new(base_path)
108+
layouts_path = File.expand_path("../../../app/views/layouts", __FILE__)
109+
@apipie_renderer = ActionView::Base.new([base_path, layouts_path])
109110
@apipie_renderer.singleton_class.send(:include, ApipieHelper)
110111
return @apipie_renderer
111112
end
@@ -118,7 +119,7 @@ namespace :apipie do
118119
end
119120
f.write av.render(
120121
:template => "#{template}",
121-
:layout => (layout && "../../layouts/apipie/#{layout}"))
122+
:layout => (layout && "apipie/#{layout}"))
122123
end
123124
end
124125

0 commit comments

Comments
 (0)