2013-07-29 1 views
0

내 앱에서 사용자에게 피드 URL 주소를 묻습니다. Feedzirra에 피드 URL을 전달하여 URL을 가져오고 구문 분석하려고하지만 현재 행운을 얻지는 못하고 있습니다.모델 변수를 사용하여 Feedzirra를 통해 피드를 당기기

내가 무슨 일을하고있는 중이 야 :

다음은 컨트롤러에서 내 공연의 방법입니다 여기

# GET /scores/1 
# GET /scores/1.json 
def show 

#@score=Score.find(params[:id]) 
@score = current_user.scores.find(params[:id]) 

url=:url 
feed=Feedzirra::Feed.fetch_and_parse(url) 
@entry=feed.entries 

respond_to do |format| 
    format.html #show.html.erb 
    format.json {render json: @score } 
end 

모델

class Score < ActiveRecord::Base 
    belongs_to :user 
    validates :user_id, presence: true 
    attr_accessible :title, :postFrequency, :editorialCalendar, :postTemplate, 
    :headlineVariations, :publishingScore, :professionalLogo, :colorScheme, :typographyStandards, 
    :seoPlugin, :googleAnalytics, :setupScore, :sb_promotion_1, :sb_promotion_2, :sb_recentPosts, 
    :sidebarScore, :leadMagnet, :emailCampaign, :productCreated, :landingPage, :monetizationScore, :url, 
    :name, :summary, :url, :published_at, :guid 

end 

답변

0
url = :url 
feed = Feedzirra::Feed.fetch_and_parse(url) 

url 변수가 항상있는 상징이 될 것입니다 그 값 :url. 이것이 당신이 원하는 것이라고 생각하지 마십시오.

관련 문제