サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
災害への備え
metautonomo.us
ZOMG CELEBRITY ENDORSEMENT “Some of this stuff is definitely gonna blow your mind.” –Gregg Pollack, Ruby5 Getting started In your Gemfile: gem "squeel" # Last officially released gem # gem "squeel", :git => "git://github.com/ernie/squeel.git" # Track git repo Squeel.configure do |config| # To load hash extensions (to allow for AND (&), OR (|), and NOT (-) against # hashes of conditions) config.loa
This domain may be for sale!
If you’re using Uploadify, the nifty jQuery file upload plugin — which we’ll forgive for providing all its examples in PHP (*shudder*) — there’s a good chance you followed the general pattern outlined by John Nunemaker over at RailsTips. His article describes in detail how to get Flash to play nicely with Rails sessions using Rack middleware. Unfortunately, Rails 3 requires a few minor changes to
Description Sometimes you’re tempted to use STI in your Rails app, but your STI classes don’t share all of the same attributes. So, you’re left with two choices: 1. Add all of the columns your descendant classes will need. 2. Remember that this occurrence is a telltale sign that STI is the wrong design pattern to be using… OR IS IT? Yes, it is. Probably. But wait! I present you with a third option
Why? I hate SQL fragments in Rails code. Resorting to where('name LIKE ?', '%something%') is an admission of defeat. It says, “I concede to allow your rigid, 1970′s-era syntax into my elegant Ruby world of object oriented goodness.” While sometimes such concessions are necessary, they should always be a last resort, because once you move away from an abstract representation of your intended query,
このページを最初にブックマークしてみませんか?
『metautonomo.us』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く