ラベル gems の投稿を表示しています。 すべての投稿を表示
ラベル gems の投稿を表示しています。 すべての投稿を表示

2010/02/09

localized_country_select で国名選択

ruby script/plugin install git://github.com/karmi/localized_country_select.git
rake import:country_select 'ja'
<%= localized_country_select(:user, :country, [], :include_blank => 'Please choose...') %>
<%= I18n.t @user.country, :scope => 'countries' %>

2010/01/04

特定のバージョンで rails の gem をフリーズする

特定のバージョンでフリーズしたいこともあるなり。
rake VERSION=2.3.5 rails:freeze:gems
config/environments.rb の編集も忘れずに
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION