0
我用meta_search
寶石。如何通過導航鏈接傳遞參數?
controllers/feed_entries_controller.rb
是
class FeedEntriesController < ApplicationController
def index
@search = FeedEntry.search(params[:search])
@feed_entries = @search.all
end
end
,並在Models/feed_entry.rb
有:is_to_read
屬性(布爾數據類型)
class FeedEntry < ActiveRecord::Base
attr_accessible :name, :summary, :url, :published_at, :guid, :is_to_read
end
和我的問題是,如何使導航鏈接+通參數有以下條件從views/feed_entries/index.html.erb
?
條件:通過is_to_read(attribute) = true
所以,我只能用feed_entries
取is_star = true.
幫助請