This domain may be for sale!
Ruby on Railsで検索機能を作成してみました。 RAILS_ROOT/config/environment.rb will_paginateをインストール後、以下をgemに追加。 require 'will_paginate' RAILS_ROOT/db/migrate/20091221045928_create_users.rb サンプルとして、以下のテーブルを作成し、一覧検索画面を作成します。 class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.string :name t.integer :age t.datetime :birthday t.timestamps end end def self.down drop_table :users end end
Railsで全文検索した結果をページ処理する方法です。 Hper Estraierを使った全文検索をサポートするsearch_doプラグイン。 Railsの全文検索にはacts_as_searchableじゃなくてsearch_do - このブログは証明できない。 Railsの全文検索は、Hyper Estraierとsearch_doプラグインで超簡単 - このブログは証明できない。 ページ処理を行うwill_paginateプラグイン。 will_paginateでRailsのページ処理 - このブログは証明できない。 これを組み合わせるにはどうすればいいのでしょうか。実は簡単。will_paginateがうまいこと設計されています。 @entries = Entry.paginate params[:keyword], :page => params[:page], :per_pag
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く