mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
only include hook if partial is available. Removes conflict with jbuilder and also resolves bug #37
This commit is contained in:
parent
7da1bf66e4
commit
c556ffdb12
1 changed files with 9 additions and 4 deletions
|
@ -115,10 +115,15 @@ module Paloma
|
|||
#
|
||||
def append_paloma_hook
|
||||
return true if self.paloma.has_no_request?
|
||||
|
||||
hook = view_context.render(
|
||||
:partial => 'paloma/hook',
|
||||
:locals => {:request => self.paloma.request})
|
||||
|
||||
# Render the partial if it is present, otherwise do nothing.
|
||||
begin
|
||||
hook = view_context.render(
|
||||
:partial => 'paloma/hook',
|
||||
:locals => {:request => self.paloma.request})
|
||||
rescue ActionView::MissingTemplate
|
||||
return true
|
||||
end
|
||||
|
||||
before_body_end_index = response_body[0].rindex('</body>')
|
||||
|
||||
|
|
Loading…
Reference in a new issue