소스 검색

Only output icon object if icon_url isn't blank

master
Adrian Short 11 년 전
부모
커밋
0cb2888265
1개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. +8
    -4
      app/helpers/posts_helper.rb

+ 8
- 4
app/helpers/posts_helper.rb 파일 보기

@@ -1,7 +1,7 @@
module PostsHelper
def post_to_poi(post, subscription)
# http://layar.com/documentation/browser/api/getpois-response/
{
res = {
:id => post.id,
:imageURL => "%s%s/assets/layar-icons/tal-logo-100.png" % [ request.protocol, request.env['HTTP_HOST'] ],
:anchor => {
@@ -24,14 +24,18 @@ module PostsHelper
:method => "GET",
:activityType => 1
},
],
:object => {
]
}

unless subscription.icon_url.blank?
res[:object] = {
:contentType => "image/vnd.layar.generic",
:url => subscription.icon_url,
:reducedURL => subscription.icon_url,
:size => 120
}
}
end
res
end
def decode_entities(s)


불러오는 중...
취소
저장