page = params[:page]
will_paginateのインスタンスを作成
@page = @views.paginate({ :page => params[:page], :per_page => 10, :total_entries => 100 })
あとはビューの方はこんな感じ
<div id ="paging"> <%= will_paginate @page %> <br />
page = params[:page]
@page = @views.paginate({ :page => params[:page], :per_page => 10, :total_entries => 100 })
<div id ="paging"> <%= will_paginate @page %> <br />
$ cd ~/Dropbox/ $ mkdir Repos $ cd Reposプロジェクト作成
$ mkdir sample.git $ cd sample.git $ git --bare initんでプロジェクトフォルダでpush
cd ~/dev/old_prj git init git add . git commit git push ~/Dropbox/repo/sample.git master git remote add origin ~/Dropbox/repo/sample.git
% git clone git://github.com/wayneeseguin/rvm.git $ cd rvm $ ./install.bash_profileに以下を記入
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
% rvm list known $ rvm install 1.8.7 $ rvm install 1.9.2 $ rvm gemset create rails2 $ rvm use 1.8.7@rails2 $ rvm gemset create rails3 $ rvm use 1.9.2@rails3 $ gem install rails
%rvm use ruby-1.9.2@rails3
$ sudo mkdir -p /opt/local/etc/LaunchDaemons/org.macports.mysql5 $ cd /opt/local/etc/LaunchDaemons/org.macports.mysql5 $ sudo curl -O http://robwilkerson.org/_resources/hotlink/blog/mysql5.wrapper $ sudo curl -O http://robwilkerson.org/_resources/hotlink/blog/org.macports.mysql5.plist $ sudo chown root:wheel /opt/local/etc/LaunchDaemons/org.macports.mysql5/* $ sudo chmod 755 /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper $ sudo chmod 644 /opt/local/etc/LaunchDaemons/org.macports.mysql5/org.macports.mysql5.plist $ sudo ln -s /opt/local/etc/LaunchDaemons/org.macports.mysql5/org.macports.mysql5.plist /Library/LaunchDaemons/org.macports.mysql5.plist
$ ruby script/plugin install git://github.com/collectiveidea/action_mailer_optional_tls.git
production: delivery_method: :smtp smtp_settings: tls: true address: "smtp.gmail.com" port: 587 domain: "smtp.gmail.com" authentication: :plain user_name: "your_email@gmail.com" password: "your_password"