我最近在看我的Rails 4應用程序的日誌,並注意到它正在處理show
作爲JavaScript和*/*
。爲什麼我的Rails應用程序處理爲JS和*/*
Processing by ArticlesController#show as */*
Processing by ArticlesController#show as JS
我有一個很難搞清楚這是什麼意思。這是值得擔憂的嗎?我會假設它應該只處理爲HTML。
這裏是我的節目:
def show
@article = Article.find(params[:id])
@related = Article.where.not(id: @article.id).tagged_with(@article.tag_list, :any => true).take(4)
@most_popular = Article.where.not(id: @article.id).order(impressions_count: :desc).take(50).sample(8)
@feedback = @article.feedbacks.build
impressionist(@article, :unique => [:session_hash])
@articles = Article.where.not(id: @article.id).order(updated_at: :desc).paginate(page: params[:page]).per_page(12)
end
如何從瀏覽器中點擊顯示操作? –
www.mysite.com/articles/:id - 這是我網站上各種文章的展示頁@Arup – Kathan
@Kathan你解決了這個問題? – inye