Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix layout path (Rails 4.2.5.1 compatibility) #425

Merged
merged 1 commit into from
Feb 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.rails42
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ source "https://rubygems.org"

gemspec

gem 'rails', '~> 4.2.5'
gem 'rails', '~> 4.2.5.1'
5 changes: 3 additions & 2 deletions lib/tasks/apipie.rake
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ namespace :apipie do
else
File.expand_path("../../../app/views/apipie/apipies", __FILE__)
end
@apipie_renderer = ActionView::Base.new(base_path)
layouts_path = File.expand_path("../../../app/views/layouts", __FILE__)
@apipie_renderer = ActionView::Base.new([base_path, layouts_path])
@apipie_renderer.singleton_class.send(:include, ApipieHelper)
return @apipie_renderer
end
Expand All @@ -118,7 +119,7 @@ namespace :apipie do
end
f.write av.render(
:template => "#{template}",
:layout => (layout && "../../layouts/apipie/#{layout}"))
:layout => (layout && "apipie/#{layout}"))
end
end

Expand Down