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 / Create controller class.tmSnippet
100644 26 lines (23 sloc) 0.624 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?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>class ${1:Model}Controller &lt; ApplicationController
  before_filter :find_${2:model}
 
  $0
 
  private
  def find_${2}
    @$2 = ${3:$1}.find(params[:id]) if params[:id]
  end
end</string>
  <key>name</key>
  <string>Create controller class</string>
  <key>scope</key>
  <string>source.ruby</string>
  <key>tabTrigger</key>
  <string>cla</string>
  <key>uuid</key>
  <string>4B3F798E-E3B6-48C8-8C2F-CB8631011638</string>
</dict>
</plist>