railties 3.0.4 → 3.0.5.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ Communicate to the reader the current way of doing things, both explicitly and i
27
27
 
28
28
  Documentation has to be concise but comprehensive. Explore and document edge cases. What happens if a module is anonymous? What if a collection is empty? What if an argument is nil?
29
29
 
30
- The proper names of Rails components have a space in between the words, like "Active Support". +ActiveRecord+ is a Ruby module, whereas Active Record is an ORM. Historically there has been lack of consistency regarding this, but we checked with David when docrails started. All Rails documentation consistently refer to Rails components by their proper name, and if in your next blog post or presentation you remember this tidbit and take it into account that'd be fenomenal :).
30
+ The proper names of Rails components have a space in between the words, like "Active Support". +ActiveRecord+ is a Ruby module, whereas Active Record is an ORM. All Rails documentation should consistently refer to Rails components by their proper name, and if in your next blog post or presentation you remember this tidbit and take it into account that'd be fenomenal :).
31
31
 
32
32
  Spell names correctly: HTML, MySQL, JavaScript, ERb. Use the article "an" for "SQL", as in "an SQL statement". Also "an SQLite database".
33
33
 
@@ -231,7 +231,7 @@ git checkout -b testing_branch
231
231
  Then you can apply their patch:
232
232
 
233
233
  <shell>
234
- git apply their-patch-file.diff
234
+ git am their-patch-file.diff
235
235
  </shell>
236
236
 
237
237
  After applying a patch, test it out! Here are some things to think about:
@@ -175,7 +175,7 @@ In any case, Rails will create a folder in your working directory called <tt>blo
175
175
 
176
176
  |_.File/Folder|_.Purpose|
177
177
  |Gemfile|This file allows you to specify what gem dependencies are needed for your Rails application.|
178
- |README.rdoc|This is a brief instruction manual for your application. Use it to tell others what your application does, how to set it up, and so on.|
178
+ |README|This is a brief instruction manual for your application. Use it to tell others what your application does, how to set it up, and so on.|
179
179
  |Rakefile|This file contains batch jobs that can be run from the terminal.|
180
180
  |app/|Contains the controllers, models, and views for your application. You'll focus on this folder for the remainder of this guide.|
181
181
  |config/|Configure your application's runtime rules, routes, database, and more.|
@@ -388,6 +388,8 @@ NOTE: You can't use +namespace+ or +:module+ with a +:controller+ path segment.
388
388
  match ':controller(/:action(/:id))', :controller => /admin\/[^\/]+/
389
389
  </ruby>
390
390
 
391
+ TIP: By default dynamic segments don't accept dots - this is because the dot is used as a separator for formatted routes. If you need to use a dot within a dynamic segment add a constraint which overrides this - for example +:id => /[^\/]+/+ allows anything except a slash.
392
+
391
393
  h4. Static Segments
392
394
 
393
395
  You can specify static segments when creating a route:
@@ -643,6 +645,8 @@ end
643
645
 
644
646
  NOTE: Of course, you can use the more advanced constraints available in non-resourceful routes in this context.
645
647
 
648
+ TIP: By default the +:id+ parameter doesn't accept dots - this is because the dot is used as a separator for formatted routes. If you need to use a dot within an +:id+ add a constraint which overrides this - for example +:id => /[^\/]+/+ allows anything except a slash.
649
+
646
650
  h4. Overriding the Named Helpers
647
651
 
648
652
  The +:as+ option lets you override the normal naming for the named route helpers. For example:
@@ -837,12 +841,6 @@ You can supply a +:method+ argument to specify the HTTP verb:
837
841
  assert_recognizes({ :controller => "photos", :action => "create" }, { :path => "photos", :method => :post })
838
842
  </ruby>
839
843
 
840
- You can also use the resourceful helpers to test recognition of a RESTful route:
841
-
842
- <ruby>
843
- assert_recognizes new_photo_url, { :path => "photos", :method => :post }
844
- </ruby>
845
-
846
844
  h5. The +assert_routing+ Assertion
847
845
 
848
846
  The +assert_routing+ assertion checks the route both ways: it tests that the path generates the options, and that the options generate the path. Thus, it combines the functions of +assert_generates+ and +assert_recognizes+.
@@ -55,11 +55,11 @@ module Rails
55
55
  end
56
56
 
57
57
  def singular_table_name
58
- @singular_table_name ||= table_name.singularize
58
+ @singular_table_name ||= (pluralize_table_names? ? table_name.singularize : table_name)
59
59
  end
60
60
 
61
61
  def plural_table_name
62
- @plural_table_name ||= table_name.pluralize
62
+ @plural_table_name ||= (pluralize_table_names? ? table_name : table_name.pluralize)
63
63
  end
64
64
 
65
65
  def plural_file_name
@@ -23,7 +23,7 @@ gem '<%= gem_for_database %>'
23
23
 
24
24
  # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
25
25
  # gem 'ruby-debug'
26
- # gem 'ruby-debug19'
26
+ # gem 'ruby-debug19', :require => 'ruby-debug'
27
27
 
28
28
  # Bundle the extra gems:
29
29
  # gem 'bj'
@@ -2,8 +2,8 @@ module Rails
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
- TINY = 4
6
- PRE = nil
5
+ TINY = 5
6
+ PRE = "rc1"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railties
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease: false
4
+ hash: 15424095
5
+ prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 4
10
- version: 3.0.4
9
+ - 5
10
+ - rc
11
+ - 1
12
+ version: 3.0.5.rc1
11
13
  platform: ruby
12
14
  authors:
13
15
  - David Heinemeier Hansson
@@ -15,7 +17,7 @@ autorequire:
15
17
  bindir: bin
16
18
  cert_chain: []
17
19
 
18
- date: 2011-02-09 00:00:00 +13:00
20
+ date: 2011-02-22 00:00:00 -08:00
19
21
  default_executable:
20
22
  dependencies:
21
23
  - !ruby/object:Gem::Dependency
@@ -58,12 +60,14 @@ dependencies:
58
60
  requirements:
59
61
  - - "="
60
62
  - !ruby/object:Gem::Version
61
- hash: 15
63
+ hash: 15424095
62
64
  segments:
63
65
  - 3
64
66
  - 0
65
- - 4
66
- version: 3.0.4
67
+ - 5
68
+ - rc
69
+ - 1
70
+ version: 3.0.5.rc1
67
71
  type: :runtime
68
72
  version_requirements: *id003
69
73
  - !ruby/object:Gem::Dependency
@@ -74,12 +78,14 @@ dependencies:
74
78
  requirements:
75
79
  - - "="
76
80
  - !ruby/object:Gem::Version
77
- hash: 15
81
+ hash: 15424095
78
82
  segments:
79
83
  - 3
80
84
  - 0
81
- - 4
82
- version: 3.0.4
85
+ - 5
86
+ - rc
87
+ - 1
88
+ version: 3.0.5.rc1
83
89
  type: :runtime
84
90
  version_requirements: *id004
85
91
  description: "Rails internals: application bootup, plugins, generators, and rake tasks."
@@ -457,7 +463,7 @@ files:
457
463
  - lib/rails/generators/rails/app/templates/test/integration/.empty_directory
458
464
  - lib/rails/generators/rails/app/templates/test/unit/.empty_directory
459
465
  - lib/rails/generators/rails/generator/templates/templates/.empty_directory
460
- has_rdoc: false
466
+ has_rdoc: true
461
467
  homepage: http://www.rubyonrails.org
462
468
  licenses: []
463
469
 
@@ -481,16 +487,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
481
487
  required_rubygems_version: !ruby/object:Gem::Requirement
482
488
  none: false
483
489
  requirements:
484
- - - ">="
490
+ - - ">"
485
491
  - !ruby/object:Gem::Version
486
- hash: 3
492
+ hash: 25
487
493
  segments:
488
- - 0
489
- version: "0"
494
+ - 1
495
+ - 3
496
+ - 1
497
+ version: 1.3.1
490
498
  requirements: []
491
499
 
492
500
  rubyforge_project: rails
493
- rubygems_version: 1.3.7
501
+ rubygems_version: 1.5.2
494
502
  signing_key:
495
503
  specification_version: 3
496
504
  summary: Tools for creating, working with, and running Rails applications.