addressable has a helper method for this
This commit is contained in:
parent
1b6c33aff5
commit
7ebf5380c6
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ module PostsHelper
|
|||
def post_iframe_url(post_id, opts={})
|
||||
opts[:width] ||= 516
|
||||
opts[:height] ||= 315
|
||||
host = AppConfig[:pod_uri].port ==80 ? AppConfig[:pod_uri].host : "#{AppConfig[:pod_uri].host}:#{AppConfig[:pod_uri].port}"
|
||||
host = AppConfig[:pod_uri].site
|
||||
"<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
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue