use AppConfig.url_to for generated urls for oembed
_url doesn't with generate https if the pod uses https
This commit is contained in:
parent
4cb4ee0b5a
commit
67fbd02ae0
2 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ module PostsHelper
|
|||
def post_iframe_url(post_id, opts={})
|
||||
opts[:width] ||= 516
|
||||
opts[:height] ||= 315
|
||||
host = AppConfig.pod_uri.authority
|
||||
"<iframe src='#{Rails.application.routes.url_helpers.post_url(post_id, :host => host)}' width='#{opts[:width]}px' height='#{opts[:height]}px' frameBorder='0'></iframe>".html_safe
|
||||
"<iframe src='#{AppConfig.url_to(Rails.application.routes.url_helpers.post_path(post_id))}' " \
|
||||
"width='#{opts[:width]}px' height='#{opts[:height]}px' frameBorder='0'></iframe>".html_safe
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class OEmbedPresenter
|
|||
end
|
||||
|
||||
def post_author_url
|
||||
Rails.application.routes.url_helpers.person_url(@post.author, :host => AppConfig.pod_uri.host)
|
||||
AppConfig.url_to(Rails.application.routes.url_helpers.person_path(@post.author))
|
||||
end
|
||||
|
||||
def iframe_html
|
||||
|
|
|
|||
Loading…
Reference in a new issue