public
Description: Ruby on Rails TextMate bundle [Learn it with PeepCode - http://peepcode.com/products/textmate-for-rails-2]
Homepage: http://groups.google.com/group/rubyonrails-textmate
Clone URL: git://github.com/drnic/ruby-on-rails-tmbundle.git
Click here to lend your support to: ruby-on-rails-tmbundle and make a donation at www.pledgie.com !
ruby-on-rails-tmbundle / Snippets / belongs_to (bt).plist
100644 17 lines (16 sloc) 0.567 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>content</key>
  <string>belongs_to :${1:object}${2:, :class_name =&gt; "${3:${1/[[:alpha:]]+|(_)/(?1::\u$0)/g}}", :foreign_key =&gt; "${4:${1}_id}"}</string>
  <key>name</key>
  <string>belongs_to</string>
  <key>scope</key>
  <string>source.ruby.rails</string>
  <key>tabTrigger</key>
  <string>bt</string>
  <key>uuid</key>
  <string>B8F08BD7-6160-482C-8A3D-CBC6BD2079A4</string>
</dict>
</plist>