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 !
Waging an unreasonable war on poor invisible trailing whitespace.

Its recommended for everyone who is commiting to turn on the
whitespace checker in Git by doing a 'chmod +x .git/hooks/pre-commit'
from the root of their working repository.  If it ever gets in the way
of your commit and you want to submit the whitespace anyway just
pass the '-n' flag to git commit.

Signed-off-by: Glenn Rempe <glenn@rempe.us>
grempe (author)
Wed Feb 20 21:56:15 -0800 2008
commit  099c610414172582d5780b8faba152c53bdbe372
tree    b59323aad5f25754d9f9bcafce4f1d0810423336
parent  935671cca9badfb349f86632ffb0586d38849a75
...
11
12
13
14
 
15
16
17
...
30
31
32
33
 
34
35
36
...
43
44
45
46
 
47
48
 
49
50
51
...
11
12
13
 
14
15
16
17
...
30
31
32
 
33
34
35
36
...
43
44
45
 
46
47
 
48
49
50
51
0
@@ -11,7 +11,7 @@ Added so far:
0
     * Controllers
0
       * respond_to (rst) and respond_to(html) (Shift+Cmd+R)
0
       * REMOVED: render_component snippets
0
- * loggers - pass a block instead of raw string to save time if
0
+ * loggers - pass a block instead of raw string to save time if
0
         logging not used (e.g. production) [thx Stephen Touset]
0
       * redirect_to for resource paths (rep, repp, renp, renpp)
0
       * render :update (ru) [thx Simon Jefford]
0
@@ -30,7 +30,7 @@ Added so far:
0
     * Migrations
0
       * Sexy Migrations now available as "t." snippets [thx Lawrence Pit]
0
       * Migration classes have own textmate scope
0
- * Add/Remove Columns - the 'down' statements are in reverse
0
+ * Add/Remove Columns - the 'down' statements are in reverse
0
         order [thx Lawrence Pit, Daniel Kristensen]
0
     * Functional Tests
0
       * assert_redirect_to for resource paths (artp, artpp, artnp, artnpp)
0
@@ -43,9 +43,9 @@ Added so far:
0
     * Added rb as a valid Rails file type [thx James Deville]
0
   * Commands
0
     * Auto-completion for Foxy Fixtures
0
- * html.erb is the default for new templates (backwards compatibility
0
+ * html.erb is the default for new templates (backwards compatibility
0
       is being worked on too)
0
- * 'Go To XXX' - available for wide range of permutations.
0
+ * 'Go To XXX' - available for wide range of permutations.
0
       Fixtures -> Models; Models -> Controllers, etc
0
   * Plugins
0
     * Footnote
...
25
26
27
28
 
29
30
31
...
50
51
52
 
 
...
25
26
27
 
28
29
30
31
...
50
51
52
53
54
0
@@ -25,7 +25,7 @@ TextMate.call_with_progress(:title =&gt; "Contacting database", :message =&gt; "
0
     data += [%w[------ ------- -------- -------]]
0
     data += columns.collect { |col, attrs| [col, attrs.primary.to_s, attrs.sql_type.to_s, attrs.default.to_s] }
0
 
0
- STDOUT &lt;&lt; data.inject('') do |output, array|
0
+ STDOUT &lt;&lt; data.inject('') do |output, array|
0
       output + array.inject('') { |row_str, value| row_str + value.ljust(20) } + "\n"
0
     end
0
   elsif klass and klass.class == Class and not klass.ancestors.include?(ActiveRecord::Base)
0
@@ -50,3 +50,5 @@ end
0
   <string>1970AE74-3949-40B3-B263-727AA3FF167A</string>
0
 </dict>
0
 </plist>
0
+
0
+
0
...
1
2
3
 
4
5
6
...
14
15
16
17
 
18
19
20
...
23
24
25
26
 
27
28
29
 
30
31
32
...
34
35
36
37
 
38
39
40
41
 
42
43
44
...
57
58
59
60
 
61
62
63
 
64
65
66
 
67
68
 
69
70
71
...
91
92
93
94
 
95
96
97
98
99
100
 
101
102
 
103
104
105
...
139
140
141
142
143
 
 
144
145
146
...
194
195
196
197
 
198
199
200
...
206
207
208
209
 
210
211
212
...
216
217
218
219
 
220
221
222
223
224
225
 
 
226
227
228
...
238
239
240
241
 
242
243
244
...
247
248
249
250
251
 
 
252
253
254
...
262
263
264
265
266
267
268
 
 
 
 
269
270
271
...
273
274
275
276
 
277
278
279
...
294
295
296
297
298
 
 
299
300
301
302
303
 
 
304
305
306
 
307
308
309
310
311
 
312
313
314
...
327
328
329
330
 
331
332
333
334
335
336
337
 
338
339
340
341
342
343
 
344
345
346
347
348
 
 
349
350
351
...
360
361
362
363
 
364
365
 
366
367
368
...
400
401
402
403
 
404
405
406
407
 
408
409
410
411
412
413
414
 
415
416
417
418
419
420
421
 
422
423
424
425
426
 
 
 
 
427
428
429
430
431
432
 
433
434
435
...
464
465
466
467
468
 
 
469
470
471
 
472
473
474
...
476
477
478
479
 
480
481
482
...
496
497
498
499
 
500
501
502
 
503
504
505
...
526
527
528
529
 
530
531
532
...
563
564
565
566
567
 
 
568
569
570
...
582
583
584
585
 
586
587
588
...
600
601
602
603
 
604
605
606
607
608
609
 
610
611
 
612
613
614
...
619
620
621
622
 
623
624
625
...
629
630
631
632
633
 
 
634
635
636
...
652
653
654
655
 
656
657
658
...
660
661
662
663
 
664
665
666
...
686
687
688
689
 
690
691
...
1
2
 
3
4
5
6
...
14
15
16
 
17
18
19
20
...
23
24
25
 
26
27
28
 
29
30
31
32
...
34
35
36
 
37
38
39
40
 
41
42
43
44
...
57
58
59
 
60
61
62
 
63
64
65
 
66
67
 
68
69
70
71
...
91
92
93
 
94
95
96
97
98
99
 
100
101
 
102
103
104
105
...
139
140
141
 
 
142
143
144
145
146
...
194
195
196
 
197
198
199
200
...
206
207
208
 
209
210
211
212
...
216
217
218
 
219
220
221
222
223
 
 
224
225
226
227
228
...
238
239
240
 
241
242
243
244
...
247
248
249
 
 
250
251
252
253
254
...
262
263
264
 
 
 
 
265
266
267
268
269
270
271
...
273
274
275
 
276
277
278
279
...
294
295
296
 
 
297
298
299
300
301
 
 
302
303
304
305
 
306
307
308
309
310
 
311
312
313
314
...
327
328
329
 
330
331
332
333
334
335
336
 
337
338
339
340
341
342
 
343
344
345
346
 
 
347
348
349
350
351
...
360
361
362
 
363
364
 
365
366
367
368
...
400
401
402
 
403
404
405
406
 
407
408
409
410
411
412
413
 
414
415
416
417
418
419
420
 
421
422
 
 
 
 
423
424
425
426
427
428
429
430
431
 
432
433
434
435
...
464
465
466
 
 
467
468
469
470
 
471
472
473
474
...
476
477
478
 
479
480
481
482
...
496
497
498
 
499
500
501
 
502
503
504
505
...
526
527
528
 
529
530
531
532
...
563
564
565
 
 
566
567
568
569
570
...
582
583
584
 
585
586
587
588
...
600
601
602
 
603
604
605
606
607
608
 
609
610
 
611
612
613
614
...
619
620
621
 
622
623
624
625
...
629
630
631
 
 
632
633
634
635
636
...
652
653
654
 
655
656
657
658
...
660
661
662
 
663
664
665
666
...
686
687
688
 
689
690
691
0
@@ -1,6 +1,6 @@
0
 # A step-by-step project that demonstrates the use of this bundle.
0
 
0
-In this demo we'll create a blog; because that's what blogs are for: being
0
+In this demo we'll create a blog; because that's what blogs are for: being
0
 demonstrations of web frameworks.
0
 
0
 The demonstration uses new features of Rails 2.0 and the snippets in this bundle.
0
@@ -14,7 +14,7 @@ The demonstration uses new features of Rails 2.0 and the snippets in this bundle
0
 ## Add some models
0
 
0
     ruby script/generate model Post subject:string body:text
0
-
0
+
0
 This creates a 001_create_post migration with a create_table:
0
 
0
     create_table :posts do |t|
0
@@ -23,10 +23,10 @@ This creates a 001_create_post migration with a create_table:
0
 
0
       t.timestamps
0
     end
0
-
0
+
0
 ## Sexy Migration support
0
 
0
-If you put the cursor on the line after `t.text :body`, type `t.` and press TAB. Select "Create boolean column" (by pressing 0), and type "published" into the template field. If nothing happened when you pressed TAB, check that when you opened the migrations file you've selected the bundle "Ruby on Rails".
0
+If you put the cursor on the line after `t.text :body`, type `t.` and press TAB. Select "Create boolean column" (by pressing 0), and type "published" into the template field. If nothing happened when you pressed TAB, check that when you opened the migrations file you've selected the bundle "Ruby on Rails".
0
 
0
 Note that another `t.` was created on the next line! Press TAB and the cursor will be placed after it. You can now press TAB again to create another column, or delete this line.
0
 
0
@@ -34,11 +34,11 @@ Here, delete the extraneous `t.` line (Shift-Ctrl-K).
0
 
0
 Run the migrations, either from the prompt:
0
 
0
- rake db:migrate
0
+ rake db:migrate
0
 
0
 or directly from the editor by pressing ^-| (Ctrl-Pipeline), and choosing option "Migrate to Current".
0
 
0
-
0
+
0
 ## Post fixtures
0
 
0
 Update the `test/fixtures/posts.yml` file as:
0
@@ -57,15 +57,15 @@ Note, in Rails 2.0 fixtures no longer have explicit ids. Later on we'll look at
0
 
0
 Create a controller for our blog, either via the command prompt:
0
 
0
- ruby script/generate controller blog
0
+ ruby script/generate controller blog
0
 
0
 or directly from the editor by pressing ^-|, and choosing option "Call Generate Script", choose "Controller", give it the name "blog", and empty the list of actions.
0
-
0
+
0
 Now open `blog_controller_test.rb`. To find this file quickly press Cmd-T, enter bct, and select the file.
0
 
0
-Note how much cleaner functional tests are now via `ActionController::TestCase`.
0
+Note how much cleaner functional tests are now via `ActionController::TestCase`.
0
 
0
-Let's do some TDD. First, delete the `test_truth` dummy method.
0
+Let's do some TDD. First, delete the `test_truth` dummy method.
0
 
0
 To create a test to show a list of blog articles:
0
 
0
@@ -91,15 +91,15 @@ Type `index` to replace `action`. Press TAB, and then DELETE to remove the first
0
 Now type `asg`, press TAB, and type `posts`, and press TAB again. This creates an instance variable lookup within an assertion:
0
 
0
     assert(posts = assigns(:posts), "Cannot find @posts")
0
-
0
+
0
 Now, let's assert the HTML format.
0
 
0
 Type `ass` and press TAB. Type `div#posts`, press TAB and DELETE, then TAB twice to place the cursor within the `assert_select` block:
0
 
0
     assert_select 'div#posts' do
0
-
0
+
0
     end
0
-
0
+
0
 Now we'll check that the `@posts` objects are represented in the `div#posts` element.
0
 
0
 With the cursor inside the `assert_select`:
0
@@ -139,8 +139,8 @@ Change the `index` action method to:
0
 To create/navigate to the view, press Shift+Alt+Cmd+DownArrow and select "View" (like above).
0
 
0
 As there is no `app/views/blog/index*` files, it will prompt you to create a blank view file. By default it guesses `index.html.erb`, but of course you can change that in the dialog box.
0
-
0
-If instead you got the message "blog_controller.rb does not have a view", note that you first need to save the file before hitting Shift-Alt-Cmd-DownArrow and selecting "View".
0
+
0
+If instead you got the message "blog_controller.rb does not have a view", note that you first need to save the file before hitting Shift-Alt-Cmd-DownArrow and selecting "View".
0
 
0
 Press enter to accept `index.html.erb`. You are taken to the new file.
0
 
0
@@ -194,7 +194,7 @@ As yet, we have no way for users to leave comments.
0
 Create a comment model:
0
 
0
     ruby script/generate model Comment body:text name:string post:references
0
-
0
+
0
 Note: here `post:references` is effectively the same as `post_id:integer`. Within the generated migration it creates `t.reference :post`. There is also a `t.` snippet for references, as for other standard datatypes, which helps setup polymorphic associations.
0
 
0
 The generated `create_table` in `002_create_comments.rb` is:
0
@@ -206,7 +206,7 @@ The generated `create_table` in `002_create_comments.rb` is:
0
 
0
       t.timestamps
0
     end
0
-
0
+
0
 Run `rake db:migrate`.
0
 
0
 Now create some comment fixtures so we can look at Foxy Fixtures. Open `text/fixtures/comments.yml`.
0
@@ -216,13 +216,13 @@ By default, the generated `comments.yml` starts like:
0
     one:
0
       body: MyText
0
       name: MyString
0
- post:
0
+ post:
0
 
0
     two:
0
       body: MyText
0
       name: MyString
0
- post:
0
-
0
+ post:
0
+
0
 The `post` fields replace the rails1.2 `post_id` fields. Now, we can specify the `post.yml` labels for a post. From above we have `published` and `unpublished`. It can be hard to remember what fixtures we have, so there is a key-combo helper.
0
 
0
 Put the cursor after `post: ` and press Alt+Escape. A drop-down box appears with the names of the `posts.yml` fixtures. Select `published` and press return. Repeat for the 2nd fixture. This gives us:
0
@@ -238,7 +238,7 @@ Put the cursor after `post: ` and press Alt+Escape. A drop-down box appears with
0
       post: published
0
 
0
 ## Associations
0
-
0
+
0
 To enable the Foxy Fixtures, we need to add associations to the model classes.
0
 
0
 You can now quickly toggle from a fixtures file (we're in comments.yml now) to the
0
@@ -247,8 +247,8 @@ model file with Shift+Alt+Cmd+DownArrow hot key.
0
 Within `comment.rb` model, create a new line within the class, and type `bt` and press TAB. Type `post`. This creates a snippet:
0
 
0
     belongs_to :post, :class_name => "Post", :foreign_key => "post_id"
0
-
0
-The class name and foreign key are now generated from the association name. You can change them by TABbing across. But, we only need the default, so we can delete these options.
0
+
0
+The class name and foreign key are now generated from the association name. You can change them by TABbing across. But, we only need the default, so we can delete these options.
0
 
0
 Press TAB and DELETE to remove the `:class_name` and `:foreign_key` options. The `Comment` class is now:
0
 
0
@@ -262,10 +262,10 @@ Create a new line within the `Post` class. Type `hm` and press TAB to generate a
0
 
0
     has_many :comments, :class_name => "Comments", :foreign_key => "class_name_id"
0
 
0
-Notice the default `:class_name` is `Comments`, not `Comment`. This is wrong,
0
-and would need to be fixed, so its really just a helper to remind you to
0
-change it. We haven't figured out how to singularize a string using a regular
0
-expression; so if you know how let us know.
0
+Notice the default `:class_name` is `Comments`, not `Comment`. This is wrong,
0
+and would need to be fixed, so its really just a helper to remind you to
0
+change it. We haven't figured out how to singularize a string using a regular
0
+expression; so if you know how let us know.
0
 
0
 But here, we don't need the options. So press TAB once and then DELETE.
0
 
0
@@ -273,7 +273,7 @@ But here, we don't need the options. So press TAB once and then DELETE.
0
       has_many :comments
0
     end
0
 
0
-Note, there is now a `has_many :through` snippet. Type `hmt` and TAB to
0
+Note, there is now a `has_many :through` snippet. Type `hmt` and TAB to
0
 activate it.
0
 
0
 Finally, we can run our tests since adding the `Comment` model + fixtures.
0
@@ -294,21 +294,21 @@ Change the routes file to:
0
 
0
 ## Creating Posts
0
 
0
-From the `Post` class (`post.rb`) you can now quickly navigate to a controller
0
-of the same name. It supports either singular or plural controller names, but
0
+From the `Post` class (`post.rb`) you can now quickly navigate to a controller
0
+of the same name. It supports either singular or plural controller names, but
0
 will default to the plural name, which is the REST/resources preferred name.
0
 
0
 To create a `PostsController`, use the 'Go To' hot key (as above) Shift+Alt+Cmd+
0
-DownArrow and select 'Controller'. As there is no `post_controller.rb` nor
0
-`posts_controller.rb` it will create a `posts_controller.rb` controller file;
0
+DownArrow and select 'Controller'. As there is no `post_controller.rb` nor
0
+`posts_controller.rb` it will create a `posts_controller.rb` controller file;
0
 which is what we want here.
0
 
0
-Note; at this stage you could use the Rails 2.0 `scaffold` generator to create
0
+Note; at this stage you could use the Rails 2.0 `scaffold` generator to create
0
 the `posts_controller.rb` (and tests and routes).
0
 
0
 In the blank file, we need to create a controller class.
0
 
0
-Type `cla` and TAB, and select "Create controller class". Type `Posts` and TAB,
0
+Type `cla` and TAB, and select "Create controller class". Type `Posts` and TAB,
0
 `post` and TAB, and finally, `Post` and TAB. This leaves the cursor in the middle
0
 of the generated class:
0
 
0
@@ -327,25 +327,25 @@ of the generated class:
0
 
0
 Currently there is not a functional test for our `posts_controller.rb`.
0
 To create it, use the 'Go To' hot key (Shift+Alt+Cmd+
0
-DownArrow) and select 'Functional Test'. This will create
0
+DownArrow) and select 'Functional Test'. This will create
0
 a blank file.
0
 
0
 Type `cla` and TAB, and select "Create functional test class".
0
 Type `Posts` and TAB. (The functional test class name
0
 should match the controller class, with `Test` suffixed to it).
0
 
0
-The functional test class snippet gives you a `deft` stub. If you
0
+The functional test class snippet gives you a `deft` stub. If you
0
 press TAB now, it creates a generic test method snippet:
0
 
0
     def test_case_name
0
 
0
     end
0
-
0
+
0
 Instead, we will use the `deftg` (GET request) and `deftp` (POST
0
 request) snippets.
0
 
0
-Create a test for the `index`, `new` and `edit` actions. For
0
-`index` and `new`, we can delete the `@model = models(:fixture_name)`,
0
+Create a test for the `index`, `new` and `edit` actions. For
0
+`index` and `new`, we can delete the `@model = models(:fixture_name)`,
0
 etc parts.
0
 
0
 To test for the `create` action, type `deftp` and TAB. Type
0
@@ -360,9 +360,9 @@ say `:subject => 'Test', :body => 'Some body', :published => '1'`
0
     end
0
 
0
 On the line after the `assert_response` expression, we'll test
0
-for where we want to be redirected to.
0
+for where we want to be redirected to.
0
 
0
-If you type `art` you create an old-style `assert_redirected_to :action => "index"`
0
+If you type `art` you create an old-style `assert_redirected_to :action => "index"`
0
 snippet.
0
 
0
 In addition there are now various `assert_redirected_to` snippets that
0
@@ -400,36 +400,36 @@ with `def` snippet:
0
 
0
     class PostsController < ApplicationController
0
       before_filter :find_post
0
-
0
+
0
       def index
0
         @posts = Post.find(:all)
0
       end
0
-
0
+
0
       def new
0
         @post = Post.new
0
       end
0
 
0
       def edit
0
       end
0
-
0
+
0
       private
0
       def find_post
0
         @post = Post.find(params[:id]) if params[:id]
0
       end
0
     end
0
 
0
-Now we need templates for the `index`, `new` and `edit` actions.
0
+Now we need templates for the `index`, `new` and `edit` actions.
0
 
0
-Place the cursor inside the `index` method,
0
-and use the 'Go To' hot key (Shift+Alt+Cmd+DownArrow)
0
-and select 'View'. A dialog box will pop up asking for the name of the new
0
-template (as there are no `app/views/posts/index*` files). By default, the
0
+Place the cursor inside the `index` method,
0
+and use the 'Go To' hot key (Shift+Alt+Cmd+DownArrow)
0
+and select 'View'. A dialog box will pop up asking for the name of the new
0
+template (as there are no `app/views/posts/index*` files). By default, the
0
 suffix is now `.html.erb` rather than the old `.rhtml`. Press RETURN,
0
 to accept `index.html.erb` as your template name.
0
 
0
 Let's just create a simple table showing the Posts.
0
 
0
-Type `table` and Ctrl+< to generate `<table></table>`, and
0
+Type `table` and Ctrl+< to generate `<table></table>`, and
0
 press RETURN to put the tags on separate lines.
0
 
0
 Do the same to create a `<tbody></tbody>` element.
0
@@ -464,11 +464,11 @@ The resulting `index.html.erb` is:
0
 
0
 ## Forms
0
 
0
-Place the cursor inside the `new` method,
0
-and use the 'Go To' hot key (Shift+Alt+Cmd+DownArrow)
0
+Place the cursor inside the `new` method,
0
+and use the 'Go To' hot key (Shift+Alt+Cmd+DownArrow)
0
 and select 'View'. Press RETURN to accept `new.html.erb`.
0
 
0
-Inside the blank `new.html.erb` file, type `ffe` and press TAB, and type `post`
0
+Inside the blank `new.html.erb` file, type `ffe` and press TAB, and type `post`
0
 and press TAB, twice:
0
 
0
     <%= error_messages_for :post %>
0
@@ -476,7 +476,7 @@ and press TAB, twice:
0
 
0
     <% end -%>
0
 
0
-`form_for` is the Rails 2.0 preferred helper for managing forms, and
0
+`form_for` is the Rails 2.0 preferred helper for managing forms, and
0
 there are now snippets for common form_for helpers. There are `ff` and `ffe`
0
 snippets; the former does not have the error messages section.
0
 
0
@@ -496,10 +496,10 @@ This gives us:
0
         <%= f.text_field :subject %>
0
       </p>
0
     <% end -%>
0
-
0
+
0
 Now repeat for `body` and `published` fields.
0
 
0
-Note, for `published`, you might change the label to `Published yet?` by TABbing
0
+Note, for `published`, you might change the label to `Published yet?` by TABbing
0
 into the default string file.
0
 
0
 Finally, add a "Submit" button using the `f.` snippet tab completion.
0
@@ -526,7 +526,7 @@ The final form is:
0
         <%= f.submit "Submit" %>
0
       </p>
0
     <% end -%>
0
-
0
+
0
 ## Partials
0
 
0
 This form is exactly the same as the form required for the `edit.html.erb` template.
0
@@ -563,8 +563,8 @@ There are several `link_to` snippets that support the resources routes:
0
 
0
 The tab stop points are in useful places.
0
 
0
-So, to create our link to the posts page, type `lipp` and TAB, type
0
-`Show all posts`, press TAB and type `post`.
0
+So, to create our link to the posts page, type `lipp` and TAB, type
0
+`Show all posts`, press TAB and type `post`.
0
 
0
 ## Controllers: `respond_to` and `redirect_to`
0
 
0
@@ -582,7 +582,7 @@ Within the class, go to the end, and type `def` and TAB, and type
0
 
0
       end
0
     end
0
-
0
+
0
 Place the cursor in the `true` section of the `if` statement.
0
 Type `repp` and TAB to create a `redirect_to` expression. Replace
0
 the selected text with `post`.
0
@@ -600,15 +600,15 @@ There are tab stops in useful places.
0
 We're going with `redirect_to(posts_path)` here, even though
0
 we don't yet have an `index` action yet.
0
 
0
-In the `false` section of the `if` expression, we'll demonstrate the
0
+In the `false` section of the `if` expression, we'll demonstrate the
0
 `respond_to` block. There are two ways to generate a `respond_to` block.
0
 
0
 Type `rst` and TAB, and you get a standard empty block you can work with:
0
 
0
     respond_to do |format|
0
-
0
+
0
     end
0
-
0
+
0
 Inside the block, type `ra` and press TAB, then type `new`. The final block
0
 is:
0
 
0
@@ -619,7 +619,7 @@ is:
0
 Alternately, there is the "upgrade" hot key. Where you can convert some
0
 existing selected code, into a `respond_to` block.
0
 
0
-Select the whole line containing the `redirect_to` expression from the
0
+Select the whole line containing the `redirect_to` expression from the
0
 `true` section of the `if` statement.
0
 
0
 Press Shift+Cmd+R (TODO - a better hot key?) and the line is replaced
0
@@ -629,8 +629,8 @@ with:
0
       redirect_to(@post)
0
     end
0
     format.js { }
0
-
0
-The `js` is the first tab stop. The point of this hot key is to instantly
0
+
0
+The `js` is the first tab stop. The point of this hot key is to instantly
0
 refactor your existing html respond code, and support a second response
0
 format.
0
 
0
@@ -652,7 +652,7 @@ The completed `create` action is:
0
         end
0
       end
0
     end
0
-
0
+
0
 Yes you'd probably only have one `respond_to` block, but this is a
0
 demo so I am taking the scenic route.
0
 
0
@@ -660,7 +660,7 @@ demo so I am taking the scenic route.
0
 
0
 In the browser, we can create posts via
0
 [http://localhost:3000/posts/new](http://localhost:3000/posts/new)
0
-and then view them as a blog visitor at
0
+and then view them as a blog visitor at
0
 [http://localhost:3000/blog](http://localhost:3000/blog).
0
 
0
 # TODO
0
@@ -686,6 +686,6 @@ and then view them as a blog visitor at
0
 * Action sequences
0
   * Show text exploding across the screen
0
 * "Coming soon"
0
- * TextMate for Rails 2.0
0
+ * TextMate for Rails 2.0
0
   * Coming Soon to PeepCode
0
   * Coincides with "Lost" TV show's noise at the end of each show
0
...
35
36
37
 
...
35
36
37
38
0
@@ -35,3 +35,4 @@ Rails 2.0 (copied from CHANGELOG)
0
 * Plugins
0
   * Footnote
0
     * footnote-edge uses .erb for templates [thx Stephen Bannasch]
0
+
...
3
4
5
6
 
7
8
9
...
3
4
5
 
6
7
8
9
0
@@ -3,7 +3,7 @@
0
 <plist version="1.0">
0
 <dict>
0
   <key>content</key>
0
- <string>assert_difference "${1:Model}.${2:count}", ${3:1} do
0
+ <string>assert_difference "${1:Model}.${2:count}", ${3:1} do
0
   $0
0
 end</string>
0
   <key>name</key>
...
3
4
5
6
 
7
8
9
...
3
4
5
 
6
7
8
9
0
@@ -3,7 +3,7 @@
0
 <plist version="1.0">
0
 <dict>
0
   <key>content</key>
0
- <string>assert_no_difference "${1:Model}.${2:count}" do
0
+ <string>assert_no_difference "${1:Model}.${2:count}" do
0
   $0
0
 end</string>
0
   <key>name</key>
...
7
8
9
10
 
11
12
13
...
7
8
9
 
10
11
12
13
0
@@ -7,7 +7,7 @@
0
   ${3:@$2 = ${4:$2s}(:${5:fixture_name})
0
   }post :${1}${6:, :id =&gt; @$2.to_param}, :${2:model} =&gt; { $0 }
0
   assert_response :redirect
0
-
0
+
0
 end</string>
0
   <key>name</key>
0
   <string>def test_should_post_action</string>
...
28
29
30
31
 
32
33
34
...
37
38
39
40
 
41
42
43
...
28
29
30
 
31
32
33
34
...
37
38
39
 
40
41
42
43
0
@@ -28,7 +28,7 @@ if TextMate.selected_text
0
   if partial_name
0
     path = current_file.dirname
0
     partial = File.join(path, "_#{partial_name}.html.erb")
0
-
0
+
0
     # Create the partial file
0
     if File.exist?(partial)
0
       unless TextMate.message_ok_cancel("The partial file already exists.", "Do you want to overwrite it?")
0
@@ -37,7 +37,7 @@ if TextMate.selected_text
0
     end
0
 
0
     file = File.open(partial, "w") { |f| f.write(TextMate.selected_text) }
0
-
0
+
0
     # Return the new render :partial line
0
     print "<%= render :partial => '#{partial_name}' %>\n"
0
   else
...
22
23
24
25
 
26
27
28
29
30
 
31
32
33
...
54
55
56
57
 
58
59
60
...
63
64
65
66
 
67
68
69
...
74
75
76
77
 
78
79
80
...
22
23
24
 
25
26
27
28
29
 
30
31
32
33
...
54
55
56
 
57
58
59
60
...
63
64
65
 
66
67
68
69
...
74
75
76
 
77
78
79
80
0
@@ -22,12 +22,12 @@ end
0
 class Generator
0
   @@list = []
0
   attr_accessor :name, :question, :default_answer
0
-
0
+
0
   def initialize(name, question, default_answer = "")
0
     @@list << self
0
     @name, @question, @default_answer = name, question, default_answer
0
   end
0
-
0
+
0
   def self.[](name, question, default_answer = "")
0
     g = new(name, question, default_answer)
0
   end
0
@@ -54,7 +54,7 @@ if choice = TextMate.choose("Generate:", Generator.names, :title => "Rails Gener
0
       :title => "#{generators[choice].name.capitalize} Generator")
0
   if name
0
     options = ""
0
-
0
+
0
     case choice
0
     when 0
0
       options = TextMate.input("Name the new controller for the scaffold:", "", :title => "Scaffold Controller Name")
0
@@ -63,7 +63,7 @@ if choice = TextMate.choose("Generate:", Generator.names, :title => "Rails Gener
0
       options = TextMate.input("List any actions you would like created for the controller:",
0
         "index new create edit update destroy", :title => "Controller Actions")
0
     end