2012-09-01から1ヶ月間の記事一覧

バリデーター

正しいとは思わないけれど、結果だけ。 Rails2系 class Hoge < ActiveRecord::Base validates_presence_of :name validates_format_of :booked_day, :with=>/\d{4}-\d{2}-\d{2}/ protected def validate errors.add(:name, "空欄なんて絶対に許さない!") if…

favotterでユーザーリストを消したい

stylishというアドオンでCSSを書いてみた @-moz-document url("http://favotter.net") { } #header{ display:none !important;} .favotters{ display:none !important;} #content .LV6 { color: #666666 !important; font-size: medium !important;} .entry-…

autocompleteの問題

routes.rbまで改造するor jQueryUIで何とかする rails3.1時代のautocompleteは(一部駄目だし) jQuery UIを使って、オートコンプリート機能を実装してみる@rails3.1

datepickerのroutingerrorな件

これで日付の入力ができちゃうってのは便利 "datepicker" %> でもエラーがでてくる。 ActionController::RoutingError (No route matches [GET] "/assets/jquery-ui/images/ui-bg_inset-hard_100_fcfdfd_1x100.png"): app_root/assets/stylesheets/jquery-ui…

WEBrickのログがいっぱいでるのは困る

Rails3.1.3+Windowsでたくさん出てくるコイツ Started GET "/assets/hoge.js?body=1" for 127.0.0.1 at 2012-09-24 09:22:00 +0900 Served asset /hoge.js - 304 Not Modified (0ms) [2012-09-24 09:22:00] WARN Could not determine content-length of res…

Redmineのカレンダーを流用する

Redmine2.0.3をAptanaに入れてカレンダーを流用することを目的とします。 へっだーだけ ひとまず動くところに持って行きたい。redmine203/app/controllers/calendar.rbから一部抜粋してapp_root/app/controllers/hoges_controller.rbに貼り付け def calendar…

event_calendarに挑戦する2

寄り道なしで書く 参考:event_calendar プラグインを使って Rails でイケてるカレンダーを実装してみた Event calendar「Generates HTML event calendars」を利用するapp_root/Gemfileに追記する gem 'event-calendar', :require => 'event_calendar'ぶんど…

Simple Calendar For Rails 3に挑戦する

Rails Tip #6: Simple Calendar For Rails 3というのを見つけたGemfileに書く gem "simple_calendar", "~> 0.0.5"ぶんどる $ bundle Installing simple_calendar (0.0.6)app/model/hoge.rb class Hoge < ActiveRecord::Base has_calendar endviewは空、コン…

event_calendarに挑戦する

ガントチャートとかカレンダーにて「redMineのカレンダーを流用(ぱくり)する」という手法で使ったけど、プラグインで管理したいので何か探すことになった。The Ruby Toolboxにてcalendarsカテゴリーがある。 Event calendar「Generates HTML event calenda…

コマンドでイロイロ

コマンドでmysqlを操作するのは久しぶりなのでメモ、新規性はなし。 mysql -u roo -p password show databases; use db_name; show tables; desc table_name;