railties 3.0.0.rc2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -17
- data/guides/rails_guides/generator.rb +2 -1
- data/guides/rails_guides/indexer.rb +2 -1
- data/guides/source/3_0_release_notes.textile +14 -14
- data/guides/source/active_record_validations_callbacks.textile +2 -2
- data/guides/source/active_support_core_extensions.textile +31 -26
- data/guides/source/association_basics.textile +19 -19
- data/guides/source/contributing_to_rails.textile +1 -1
- data/guides/source/getting_started.textile +11 -10
- data/guides/source/index.html.erb +1 -1
- data/guides/source/initialization.textile +22 -22
- data/guides/source/layout.html.erb +1 -1
- data/guides/source/migrations.textile +1 -1
- data/lib/rails/cli.rb +2 -0
- data/lib/rails/deprecation.rb +3 -3
- data/lib/rails/generators/rails/app/app_generator.rb +3 -0
- data/lib/rails/tasks/routes.rake +8 -15
- data/lib/rails/version.rb +1 -2
- metadata +15 -20
data/CHANGELOG
CHANGED
@@ -1,9 +1,4 @@
|
|
1
|
-
*Rails 3.0.0
|
2
|
-
|
3
|
-
* No material changes (see http://github.com/rails/rails/compare/v3.0.0_RC...v3.0.0_RC2 for gory details)
|
4
|
-
|
5
|
-
|
6
|
-
*Rails 3.0.0 [release candidate] (July 26th, 2010)*
|
1
|
+
*Rails 3.0.0 (August 29, 2010)*
|
7
2
|
|
8
3
|
* Application generation: --skip-testunit and --skip-activerecord become --skip-test-unit
|
9
4
|
and --skip-active-record respectively. [fxn]
|
@@ -20,19 +15,10 @@
|
|
20
15
|
|
21
16
|
* Made the rails command work even when you're in a subdirectory [Chad Fowler]
|
22
17
|
|
23
|
-
|
24
|
-
*Rails 3.0.0 [beta 4] (June 8th, 2010)*
|
25
|
-
|
26
18
|
* Removed Rails Metal [Yehuda Katz, José Valim].
|
27
19
|
|
28
|
-
|
29
|
-
*Rails 3.0.0 [beta 3] (April 13th, 2010)*
|
30
|
-
|
31
20
|
* Renamed config.cookie_secret to config.secret_token and pass it as env key. [José Valim]
|
32
21
|
|
33
|
-
|
34
|
-
*Rails 3.0.0 [beta 2] (April 1st, 2010)*
|
35
|
-
|
36
22
|
* Session store configuration has changed [Yehuda Katz, Carl Lerche]
|
37
23
|
|
38
24
|
config.session_store :cookie_store, {:key => "..."}
|
@@ -44,8 +30,6 @@
|
|
44
30
|
* Added config.generators.templates to provide alternative paths for the generators
|
45
31
|
to look for templates [José Valim]
|
46
32
|
|
47
|
-
*Rails 3.0.0 [beta 1] (February 4, 2010)*
|
48
|
-
|
49
33
|
* Added "rake about" as a replacement for script/about [DHH]
|
50
34
|
|
51
35
|
* Removed all the default commands in script/* and replaced them with script/rails and a rails command that'll act the same when run from within the app [DHH]. Example:
|
@@ -237,8 +237,9 @@ module RailsGuides
|
|
237
237
|
end
|
238
238
|
end
|
239
239
|
|
240
|
-
#
|
240
|
+
# Footnotes.
|
241
241
|
anchors += Set.new(html.scan(/<p\s+class="footnote"\s+id="([^"]+)/).flatten)
|
242
|
+
anchors += Set.new(html.scan(/<sup\s+class="footnote"\s+id="([^"]+)/).flatten)
|
242
243
|
return anchors
|
243
244
|
end
|
244
245
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'active_support/core_ext/object/blank'
|
2
2
|
require 'active_support/ordered_hash'
|
3
|
+
require 'active_support/core_ext/string/inflections'
|
3
4
|
|
4
5
|
module RailsGuides
|
5
6
|
class Indexer
|
@@ -58,7 +59,7 @@ module RailsGuides
|
|
58
59
|
end
|
59
60
|
|
60
61
|
def title_to_idx(title)
|
61
|
-
idx = title.strip.
|
62
|
+
idx = title.strip.parameterize.sub(/^\d+/, '')
|
62
63
|
if warnings && idx.blank?
|
63
64
|
puts "BLANK ID: please put an explicit ID for section #{title}, as in h5(#my-id)"
|
64
65
|
end
|
@@ -201,9 +201,9 @@ Finally a couple of enhancements were added to the rake tasks:
|
|
201
201
|
|
202
202
|
Railties now deprecates:
|
203
203
|
|
204
|
-
* <tt>RAILS_ROOT</tt> in
|
205
|
-
* <tt>RAILS_ENV</tt> in
|
206
|
-
* <tt>RAILS_DEFAULT_LOGGER</tt> in
|
204
|
+
* <tt>RAILS_ROOT</tt> in favor of <tt>Rails.root</tt>,
|
205
|
+
* <tt>RAILS_ENV</tt> in favor of <tt>Rails.env</tt>, and
|
206
|
+
* <tt>RAILS_DEFAULT_LOGGER</tt> in favor of <tt>Rails.logger</tt>.
|
207
207
|
|
208
208
|
<tt>PLUGIN/rails/tasks</tt>, and <tt>PLUGIN/tasks</tt> are no longer loaded all tasks now must be in <tt>PLUGIN/lib/tasks</tt>.
|
209
209
|
|
@@ -241,7 +241,7 @@ h4. Action Controller
|
|
241
241
|
|
242
242
|
Deprecations:
|
243
243
|
|
244
|
-
* <tt>filter_parameter_logging</tt> is deprecated in
|
244
|
+
* <tt>filter_parameter_logging</tt> is deprecated in favor of <tt>config.filter_parameters << :password</tt>.
|
245
245
|
|
246
246
|
More Information:
|
247
247
|
* "Render Options in Rails 3":http://www.engineyard.com/blog/2010/render-options-in-rails-3/
|
@@ -363,8 +363,8 @@ Validations have been moved from Active Record into Active Model, providing an i
|
|
363
363
|
* The +validates+ method has the following options:
|
364
364
|
* <tt>:acceptance => Boolean</tt>.
|
365
365
|
* <tt>:confirmation => Boolean</tt>.
|
366
|
-
* <tt>:exclusion => { :in =>
|
367
|
-
* <tt>:inclusion => { :in =>
|
366
|
+
* <tt>:exclusion => { :in => Enumerable }</tt>.
|
367
|
+
* <tt>:inclusion => { :in => Enumerable }</tt>.
|
368
368
|
* <tt>:format => { :with => Regexp, :on => :create }</tt>.
|
369
369
|
* <tt>:length => { :maximum => Fixnum }</tt>.
|
370
370
|
* <tt>:numericality => Boolean</tt>.
|
@@ -452,7 +452,7 @@ h4. Patches and Deprecations
|
|
452
452
|
|
453
453
|
Additionally, many fixes in the Active Record branch:
|
454
454
|
|
455
|
-
* SQLite 2 support has been dropped in
|
455
|
+
* SQLite 2 support has been dropped in favor of SQLite 3.
|
456
456
|
* MySQL support for column order.
|
457
457
|
* PostgreSQL adapter has had its +TIME ZONE+ support fixed so it no longer inserts incorrect values.
|
458
458
|
* Support multiple schemas in table names for PostgreSQL.
|
@@ -464,11 +464,11 @@ As well as the following deprecations:
|
|
464
464
|
|
465
465
|
* +named_scope+ in an Active Record class is deprecated and has been renamed to just +scope+.
|
466
466
|
* In +scope+ methods, you should move to using the relation methods, instead of a <tt>:conditions => {}</tt> finder method, for example <tt>scope :since, lambda {|time| where("created_at > ?", time) }</tt>.
|
467
|
-
* <tt>save(false)</tt> is deprecated, in
|
467
|
+
* <tt>save(false)</tt> is deprecated, in favor of <tt>save(:validate => false)</tt>.
|
468
468
|
* I18n error messages for ActiveRecord should be changed from :en.activerecord.errors.template to <tt>:en.errors.template</tt>.
|
469
|
-
* <tt>model.errors.on</tt> is deprecated in
|
469
|
+
* <tt>model.errors.on</tt> is deprecated in favor of <tt>model.errors[]</tt>
|
470
470
|
* validates_presence_of => validates... :presence => true
|
471
|
-
* <tt>ActiveRecord::Base.colorize_logging</tt> and <tt>config.active_record.colorize_logging</tt> are deprecated in
|
471
|
+
* <tt>ActiveRecord::Base.colorize_logging</tt> and <tt>config.active_record.colorize_logging</tt> are deprecated in favor of <tt>Rails::LogSubscriber.colorize_logging</tt> or <tt>config.colorize_logging</tt>
|
472
472
|
|
473
473
|
NOTE: While an implementation of State Machine has been in Active Record edge for some months now, it has been removed from the Rails 3.0 release.
|
474
474
|
|
@@ -491,7 +491,7 @@ Active Resource was also extracted out to Active Model allowing you to use Activ
|
|
491
491
|
* Renamed <tt>SchemaDefinition</tt> to <tt>Schema</tt> and <tt>define_schema</tt> to <tt>schema</tt>.
|
492
492
|
* Use the <tt>format</tt> of Active Resources rather than the <tt>content-type</tt> of remote errors to load errors.
|
493
493
|
* Use <tt>instance_eval</tt> for schema block.
|
494
|
-
* Fix <tt>ActiveResource::ConnectionError#to_s</tt> when +@response+ does not respond to #code or #message, handles Ruby 1.9
|
494
|
+
* Fix <tt>ActiveResource::ConnectionError#to_s</tt> when +@response+ does not respond to #code or #message, handles Ruby 1.9 compatibility.
|
495
495
|
* Add support for errors in JSON format.
|
496
496
|
* Ensure <tt>load</tt> works with numeric arrays.
|
497
497
|
* Recognizes a 410 response from remote resource as the resource has been deleted.
|
@@ -500,7 +500,7 @@ Active Resource was also extracted out to Active Model allowing you to use Activ
|
|
500
500
|
|
501
501
|
Deprecations:
|
502
502
|
|
503
|
-
* <tt>save(false)</tt> is deprecated, in
|
503
|
+
* <tt>save(false)</tt> is deprecated, in favor of <tt>save(:validate => false)</tt>.
|
504
504
|
* Ruby 1.9.2: <tt>URI.parse</tt> and <tt>.decode</tt> are deprecated and are no longer used in the library.
|
505
505
|
|
506
506
|
|
@@ -551,7 +551,7 @@ The following methods have been removed because they are now available in Ruby 1
|
|
551
551
|
* <tt>Object#instance_variable_defined?</tt>
|
552
552
|
* <tt>Enumerable#none?</tt>
|
553
553
|
|
554
|
-
The security patch for REXML remains in Active Support because early
|
554
|
+
The security patch for REXML remains in Active Support because early patch-levels of Ruby 1.8.7 still need it. Active Support knows whether it has to apply it or not.
|
555
555
|
|
556
556
|
The following methods have been removed because they are no longer used in the framework:
|
557
557
|
|
@@ -579,7 +579,7 @@ Action Mailer has been given a new API with TMail being replaced out with the ne
|
|
579
579
|
|
580
580
|
Deprecations:
|
581
581
|
|
582
|
-
* <tt>:charset</tt>, <tt>:content_type</tt>, <tt>:mime_version</tt>, <tt>:implicit_parts_order</tt> are all deprecated in
|
582
|
+
* <tt>:charset</tt>, <tt>:content_type</tt>, <tt>:mime_version</tt>, <tt>:implicit_parts_order</tt> are all deprecated in favor of <tt>ActionMailer.default :key => value</tt> style declarations.
|
583
583
|
* Mailer dynamic <tt>create_method_name</tt> and <tt>deliver_method_name</tt> are deprecated, just call <tt>method_name</tt> which now returns a <tt>Mail::Message</tt> object.
|
584
584
|
* <tt>ActionMailer.deliver(message)</tt> is deprecated, just call <tt>message.deliver</tt>.
|
585
585
|
* <tt>template_root</tt> is deprecated, pass options to a render call inside a proc from the <tt>format.mime_type</tt> method inside the <tt>mail</tt> generation block
|
@@ -57,7 +57,7 @@ We can see how it works by looking at some +rails console+ output:
|
|
57
57
|
=> false
|
58
58
|
</shell>
|
59
59
|
|
60
|
-
Creating and saving a new record will send
|
60
|
+
Creating and saving a new record will send an SQL +INSERT+ operation to the database. Updating an existing record will send an SQL +UPDATE+ operation instead. Validations are typically run before these commands are sent to the database. If any validations fail, the object will be marked as invalid and Active Record will not perform the +INSERT+ or +UPDATE+ operation. This helps to avoid storing an invalid object in the database. You can choose to have specific validations run when an object is created, saved, or updated.
|
61
61
|
|
62
62
|
CAUTION: There are many ways to change the state of an object in the database. Some methods will trigger validations, but some will not. This means that it's possible to save an object in the database in an invalid state if you aren't careful.
|
63
63
|
|
@@ -382,7 +382,7 @@ class Account < ActiveRecord::Base
|
|
382
382
|
end
|
383
383
|
</ruby>
|
384
384
|
|
385
|
-
The validation happens by performing
|
385
|
+
The validation happens by performing an SQL query into the model's table, searching for an existing record with the same value in that attribute.
|
386
386
|
|
387
387
|
There is a +:scope+ option that you can use to specify other attributes that are used to limit the uniqueness check:
|
388
388
|
|
@@ -1296,6 +1296,31 @@ Active Support defines 3rd person aliases of +String#start_with?+ and +String#en
|
|
1296
1296
|
|
1297
1297
|
NOTE: Defined in +active_support/core_ext/string/starts_ends_with.rb+.
|
1298
1298
|
|
1299
|
+
h4. +strip_heredoc+
|
1300
|
+
|
1301
|
+
The method +strip_heredoc+ strips indentation in heredocs.
|
1302
|
+
|
1303
|
+
For example in
|
1304
|
+
|
1305
|
+
<ruby>
|
1306
|
+
if options[:usage]
|
1307
|
+
puts <<-USAGE.strip_heredoc
|
1308
|
+
This command does such and such.
|
1309
|
+
|
1310
|
+
Supported options are:
|
1311
|
+
-h This message
|
1312
|
+
...
|
1313
|
+
USAGE
|
1314
|
+
end
|
1315
|
+
</ruby>
|
1316
|
+
|
1317
|
+
the user would see the usage message aligned against the left margin.
|
1318
|
+
|
1319
|
+
Technically, it looks for the least indented line in the whole string, and removes
|
1320
|
+
that amount of leading whitespace.
|
1321
|
+
|
1322
|
+
NOTE: Defined in +active_support/core_ext/string/strip.rb+.
|
1323
|
+
|
1299
1324
|
h4. Access
|
1300
1325
|
|
1301
1326
|
h5. +at(position)+
|
@@ -1685,27 +1710,7 @@ foreign_key = options[:foreign_key] || reflection.active_record.name.foreign_key
|
|
1685
1710
|
|
1686
1711
|
NOTE: Defined in +active_support/core_ext/string/inflections.rb+.
|
1687
1712
|
|
1688
|
-
h4. Conversions
|
1689
|
-
|
1690
|
-
h5. +constantize+
|
1691
|
-
|
1692
|
-
The method +constantize+ expects the receiver to contain the name of a constant, and tries to get you the object stored in there, assuming it is defined:
|
1693
|
-
|
1694
|
-
<ruby>
|
1695
|
-
"ActiveRecord::Base".constantize # => ActiveRecord::Base
|
1696
|
-
</ruby>
|
1697
|
-
|
1698
|
-
The name is assumed to be top-level, no matter whether it starts with "::" or not. No lexical context is taken into account:
|
1699
|
-
|
1700
|
-
<ruby>
|
1701
|
-
C = 1
|
1702
|
-
module M
|
1703
|
-
C = 2
|
1704
|
-
"C".constantize # => 1, same as "::C".constantize
|
1705
|
-
end
|
1706
|
-
</ruby>
|
1707
|
-
|
1708
|
-
NOTE: Defined in +active_support/core_ext/string/conversions.rb+.
|
1713
|
+
h4(#string-conversions). Conversions
|
1709
1714
|
|
1710
1715
|
h5. +ord+
|
1711
1716
|
|
@@ -2041,7 +2046,7 @@ This method receives an arbitrary number of action names, and an optional hash o
|
|
2041
2046
|
|
2042
2047
|
NOTE: Defined in +active_support/core_ext/array/extract_options.rb+.
|
2043
2048
|
|
2044
|
-
h4. Conversions
|
2049
|
+
h4(#array-conversions). Conversions
|
2045
2050
|
|
2046
2051
|
h5. +to_sentence+
|
2047
2052
|
|
@@ -2226,7 +2231,7 @@ There's also a related idiom that uses the splat operator:
|
|
2226
2231
|
[*object]
|
2227
2232
|
</ruby>
|
2228
2233
|
|
2229
|
-
which returns +[nil]+ for +nil+, and calls to <tt>Array(object)</tt> otherwise
|
2234
|
+
which in Ruby 1.8 returns +[nil]+ for +nil+, and calls to <tt>Array(object)</tt> otherwise. (Please if you know the exact behavior in 1.9 contact fxn.)
|
2230
2235
|
|
2231
2236
|
Thus, in this case the behavior is different for +nil+, and the differences with <tt>Kernel#Array</tt> explained above apply to the rest of +object+s.
|
2232
2237
|
|
@@ -2985,7 +2990,7 @@ Date.new(2010, 1, 31).change(:month => 2)
|
|
2985
2990
|
# => ArgumentError: invalid date
|
2986
2991
|
</ruby>
|
2987
2992
|
|
2988
|
-
h5. Durations
|
2993
|
+
h5(#date-durations). Durations
|
2989
2994
|
|
2990
2995
|
Durations can be added and substracted to dates:
|
2991
2996
|
|
@@ -3191,7 +3196,7 @@ DateTime.current.change(:month => 2, :day => 30)
|
|
3191
3196
|
# => ArgumentError: invalid date
|
3192
3197
|
</ruby>
|
3193
3198
|
|
3194
|
-
h5. Durations
|
3199
|
+
h5(#datetime-durations). Durations
|
3195
3200
|
|
3196
3201
|
Durations can be added and substracted to datetimes:
|
3197
3202
|
|
@@ -3304,7 +3309,7 @@ Both +local_time+ and +utc_time+ accept up to seven positional arguments: year,
|
|
3304
3309
|
|
3305
3310
|
If the time to be constructed lies beyond the range supported by +Time+ in the runtime platform, usecs are discarded and a +DateTime+ object is returned instead.
|
3306
3311
|
|
3307
|
-
h5. Durations
|
3312
|
+
h5(#time-durations). Durations
|
3308
3313
|
|
3309
3314
|
Durations can be added and substracted to time objects:
|
3310
3315
|
|
@@ -550,7 +550,7 @@ build_customer
|
|
550
550
|
create_customer
|
551
551
|
</ruby>
|
552
552
|
|
553
|
-
h6. _association_(force_reload = false)
|
553
|
+
h6. <tt>_association_(force_reload = false)</tt>
|
554
554
|
|
555
555
|
The <tt><em>association</em></tt> method returns the associated object, if any. If no associated object is found, it returns +nil+.
|
556
556
|
|
@@ -560,7 +560,7 @@ The <tt><em>association</em></tt> method returns the associated object, if any.
|
|
560
560
|
|
561
561
|
If the associated object has already been retrieved from the database for this object, the cached version will be returned. To override this behavior (and force a database read), pass +true+ as the +force_reload+ argument.
|
562
562
|
|
563
|
-
h6. _association_=(associate)
|
563
|
+
h6. <tt>_association_=(associate)</tt>
|
564
564
|
|
565
565
|
The <tt><em>association</em>=</tt> method assigns an associated object to this object. Behind the scenes, this means extracting the primary key from the associate object and setting this object's foreign key to the same value.
|
566
566
|
|
@@ -568,7 +568,7 @@ The <tt><em>association</em>=</tt> method assigns an associated object to this o
|
|
568
568
|
@order.customer = @customer
|
569
569
|
</ruby>
|
570
570
|
|
571
|
-
h6. build_<em>association</em>(attributes = {})
|
571
|
+
h6(#belongs_to-build_association). <tt>build_<em>association</em>(attributes = {})</tt>
|
572
572
|
|
573
573
|
The <tt>build_<em>association</em></tt> method returns a new object of the associated type. This object will be instantiated from the passed attributes, and the link through this object's foreign key will be set, but the associated object will _not_ yet be saved.
|
574
574
|
|
@@ -577,7 +577,7 @@ The <tt>build_<em>association</em></tt> method returns a new object of the assoc
|
|
577
577
|
:customer_name => "John Doe")
|
578
578
|
</ruby>
|
579
579
|
|
580
|
-
h6. create_<em>association</em>(attributes = {})
|
580
|
+
h6(#belongs_to-create_association). <tt>create_<em>association</em>(attributes = {})</tt>
|
581
581
|
|
582
582
|
The <tt>create_<em>association</em></tt> method returns a new object of the associated type. This object will be instantiated from the passed attributes, and the link through this object's foreign key will be set. In addition, the associated object _will_ be saved (assuming that it passes any validations).
|
583
583
|
|
@@ -629,7 +629,7 @@ end
|
|
629
629
|
|
630
630
|
h6(#belongs_to-conditions). +:conditions+
|
631
631
|
|
632
|
-
The +:conditions+ option lets you specify the conditions that the associated object must meet (in the syntax used by
|
632
|
+
The +:conditions+ option lets you specify the conditions that the associated object must meet (in the syntax used by an SQL +WHERE+ clause).
|
633
633
|
|
634
634
|
<ruby>
|
635
635
|
class Order < ActiveRecord::Base
|
@@ -835,7 +835,7 @@ The <tt><em>association</em>=</tt> method assigns an associated object to this o
|
|
835
835
|
@supplier.account = @account
|
836
836
|
</ruby>
|
837
837
|
|
838
|
-
h6. <tt>build_<em>association</em>(attributes = {})</tt>
|
838
|
+
h6(#has_one-build_association). <tt>build_<em>association</em>(attributes = {})</tt>
|
839
839
|
|
840
840
|
The <tt>build_<em>association</em></tt> method returns a new object of the associated type. This object will be instantiated from the passed attributes, and the link through its foreign key will be set, but the associated object will _not_ yet be saved.
|
841
841
|
|
@@ -843,7 +843,7 @@ The <tt>build_<em>association</em></tt> method returns a new object of the assoc
|
|
843
843
|
@account = @supplier.build_account(:terms => "Net 30")
|
844
844
|
</ruby>
|
845
845
|
|
846
|
-
h6. <tt>create_<em>association</em>(attributes = {})</tt>
|
846
|
+
h6(#has_one-create_association). <tt>create_<em>association</em>(attributes = {})</tt>
|
847
847
|
|
848
848
|
The <tt>create_<em>association</em></tt> method returns a new object of the associated type. This object will be instantiated from the passed attributes, and the link through its foreign key will be set. In addition, the associated object _will_ be saved (assuming that it passes any validations).
|
849
849
|
|
@@ -899,7 +899,7 @@ end
|
|
899
899
|
|
900
900
|
h6(#has_one-conditions). +:conditions+
|
901
901
|
|
902
|
-
The +:conditions+ option lets you specify the conditions that the associated object must meet (in the syntax used by
|
902
|
+
The +:conditions+ option lets you specify the conditions that the associated object must meet (in the syntax used by an SQL +WHERE+ clause).
|
903
903
|
|
904
904
|
<ruby>
|
905
905
|
class Supplier < ActiveRecord::Base
|
@@ -961,7 +961,7 @@ end
|
|
961
961
|
|
962
962
|
h6(#has_one-order). +:order+
|
963
963
|
|
964
|
-
The +:order+ option dictates the order in which associated objects will be received (in the syntax used by
|
964
|
+
The +:order+ option dictates the order in which associated objects will be received (in the syntax used by an SQL +ORDER BY+ clause). Because a +has_one+ association will only retrieve a single associated object, this option should not be needed.
|
965
965
|
|
966
966
|
h6(#has_one-primary_key). +:primary_key+
|
967
967
|
|
@@ -985,7 +985,7 @@ The +:source_type+ option specifies the source association type for a +has_one :
|
|
985
985
|
|
986
986
|
h6(#has_one-through). +:through+
|
987
987
|
|
988
|
-
The +:through+ option specifies a join model through which to perform the query. +has_one :through+ associations were discussed in detail <a href="#the-
|
988
|
+
The +:through+ option specifies a join model through which to perform the query. +has_one :through+ associations were discussed in detail <a href="#the-has_one-through-association">earlier in this guide</a>.
|
989
989
|
|
990
990
|
h6(#has_one-validate). +:validate+
|
991
991
|
|
@@ -1136,7 +1136,7 @@ h6. <tt><em>collection</em>.exists?(...)</tt>
|
|
1136
1136
|
|
1137
1137
|
The <tt><em>collection</em>.exists?</tt> method checks whether an object meeting the supplied conditions exists in the collection. It uses the same syntax and options as +ActiveRecord::Base.exists?+.
|
1138
1138
|
|
1139
|
-
h6. <tt><em>collection</em>.build(attributes = {}, ...)</tt>
|
1139
|
+
h6(#has_many_collection_build). <tt><em>collection</em>.build(attributes = {}, ...)</tt>
|
1140
1140
|
|
1141
1141
|
The <tt><em>collection</em>.build</tt> method returns one or more new objects of the associated type. These objects will be instantiated from the passed attributes, and the link through their foreign key will be created, but the associated objects will _not_ yet be saved.
|
1142
1142
|
|
@@ -1209,7 +1209,7 @@ end
|
|
1209
1209
|
|
1210
1210
|
h6(#has_many-conditions). +:conditions+
|
1211
1211
|
|
1212
|
-
The +:conditions+ option lets you specify the conditions that the associated object must meet (in the syntax used by
|
1212
|
+
The +:conditions+ option lets you specify the conditions that the associated object must meet (in the syntax used by an SQL +WHERE+ clause).
|
1213
1213
|
|
1214
1214
|
<ruby>
|
1215
1215
|
class Customer < ActiveRecord::Base
|
@@ -1335,7 +1335,7 @@ The +:offset+ option lets you specify the starting offset for fetching objects v
|
|
1335
1335
|
|
1336
1336
|
h6(#has_many-order). +:order+
|
1337
1337
|
|
1338
|
-
The +:order+ option dictates the order in which associated objects will be received (in the syntax used by
|
1338
|
+
The +:order+ option dictates the order in which associated objects will be received (in the syntax used by an SQL +ORDER BY+ clause).
|
1339
1339
|
|
1340
1340
|
<ruby>
|
1341
1341
|
class Customer < ActiveRecord::Base
|
@@ -1367,7 +1367,7 @@ The +:source_type+ option specifies the source association type for a +has_many
|
|
1367
1367
|
|
1368
1368
|
h6(#has_many-through). +:through+
|
1369
1369
|
|
1370
|
-
The +:through+ option specifies a join model through which to perform the query. +has_many :through+ associations provide a way to implement many-to-many relationships, as discussed <a href="#the-
|
1370
|
+
The +:through+ option specifies a join model through which to perform the query. +has_many :through+ associations provide a way to implement many-to-many relationships, as discussed <a href="#the-has_many-through-association">earlier in this guide</a>.
|
1371
1371
|
|
1372
1372
|
h6(#has_many-uniq). +:uniq+
|
1373
1373
|
|
@@ -1553,7 +1553,7 @@ h6(#has_and_belongs_to_many-collection-exists). <tt><em>collection</em>.exists?(
|
|
1553
1553
|
|
1554
1554
|
The <tt><em>collection</em>.exists?</tt> method checks whether an object meeting the supplied conditions exists in the collection. It uses the same syntax and options as +ActiveRecord::Base.exists?+.
|
1555
1555
|
|
1556
|
-
h6. <tt><em>collection</em>.build(attributes = {})</tt>
|
1556
|
+
h6(#has_and_belongs_to_many-collection-build). <tt><em>collection</em>.build(attributes = {})</tt>
|
1557
1557
|
|
1558
1558
|
The <tt><em>collection</em>.build</tt> method returns a new object of the associated type. This object will be instantiated from the passed attributes, and the link through the join table will be created, but the associated object will _not_ yet be saved.
|
1559
1559
|
|
@@ -1635,7 +1635,7 @@ end
|
|
1635
1635
|
|
1636
1636
|
h6(#has_and_belongs_to_many-conditions). +:conditions+
|
1637
1637
|
|
1638
|
-
The +:conditions+ option lets you specify the conditions that the associated object must meet (in the syntax used by
|
1638
|
+
The +:conditions+ option lets you specify the conditions that the associated object must meet (in the syntax used by an SQL +WHERE+ clause).
|
1639
1639
|
|
1640
1640
|
<ruby>
|
1641
1641
|
class Parts < ActiveRecord::Base
|
@@ -1724,7 +1724,7 @@ The +:offset+ option lets you specify the starting offset for fetching objects v
|
|
1724
1724
|
|
1725
1725
|
h6(#has_and_belongs_to_many-order). +:order+
|
1726
1726
|
|
1727
|
-
The +:order+ option dictates the order in which associated objects will be received (in the syntax used by
|
1727
|
+
The +:order+ option dictates the order in which associated objects will be received (in the syntax used by an SQL +ORDER BY+ clause).
|
1728
1728
|
|
1729
1729
|
<ruby>
|
1730
1730
|
class Parts < ActiveRecord::Base
|
@@ -1760,9 +1760,9 @@ If you want to assign an object to a +has_and_belongs_to_many+ association witho
|
|
1760
1760
|
|
1761
1761
|
h4. Association Callbacks
|
1762
1762
|
|
1763
|
-
Normal callbacks hook into the
|
1763
|
+
Normal callbacks hook into the life cycle of Active Record objects, allowing you to work with those objects at various points. For example, you can use a +:before_save+ callback to cause something to happen just before an object is saved.
|
1764
1764
|
|
1765
|
-
Association callbacks are similar to normal callbacks, but they are triggered by events in the
|
1765
|
+
Association callbacks are similar to normal callbacks, but they are triggered by events in the life cycle of a collection. There are four available association callbacks:
|
1766
1766
|
|
1767
1767
|
* +before_add+
|
1768
1768
|
* +after_add+
|
@@ -194,15 +194,13 @@ In any case, Rails will create a folder in your working directory called <tt>blo
|
|
194
194
|
|
195
195
|
h4. Installing the Required Gems
|
196
196
|
|
197
|
-
Rails
|
197
|
+
Rails applications manage gem dependencies with "Bundler":http://www.github.com/carlhuda/bundler by default. As we don't need any other gems beyond the ones in the generated +Gemfile+ we can directly run
|
198
198
|
|
199
199
|
<shell>
|
200
|
-
|
201
|
-
# gem install bundler
|
202
|
-
# bundle install
|
200
|
+
bundle install
|
203
201
|
</shell>
|
204
202
|
|
205
|
-
|
203
|
+
to have them ready.
|
206
204
|
|
207
205
|
h4. Configuring a Database
|
208
206
|
|
@@ -235,7 +233,7 @@ If you choose to use MySQL instead of the shipped Sqlite3 database, your +config
|
|
235
233
|
|
236
234
|
<yaml>
|
237
235
|
development:
|
238
|
-
adapter:
|
236
|
+
adapter: mysql2
|
239
237
|
encoding: utf8
|
240
238
|
database: blog_development
|
241
239
|
pool: 5
|
@@ -488,6 +486,8 @@ After the console loads, you can use it to work with your application's models:
|
|
488
486
|
|
489
487
|
This code shows creating a new +Post+ instance, attempting to save it and getting +false+ for a return value (indicating that the save failed), and inspecting the +errors+ of the post.
|
490
488
|
|
489
|
+
When you're finished, type +exit+ and hit +return+ to exit the console.
|
490
|
+
|
491
491
|
TIP: Unlike the development web server, the console does not automatically load your code afresh for each line. If you make changes to your models while the console is open, type +reload!+ at the console prompt to load them.
|
492
492
|
|
493
493
|
h4. Listing All Posts
|
@@ -1015,7 +1015,7 @@ Once we have made the new comment, we send the user back to the original post us
|
|
1015
1015
|
|
1016
1016
|
Now you can add posts and comments to your blog and have them show up in the right places.
|
1017
1017
|
|
1018
|
-
h3.
|
1018
|
+
h3. Refactoring
|
1019
1019
|
|
1020
1020
|
Now that we have Posts and Comments working, if we take a look at the +app/views/posts/show.html.erb+ template, it's getting long and awkward. We can use partials to clean this up.
|
1021
1021
|
|
@@ -1139,7 +1139,7 @@ Then you make the +app/views/posts/show.html.erb+ look like the following:
|
|
1139
1139
|
<%= link_to 'Back to Posts', posts_path %> |
|
1140
1140
|
</erb>
|
1141
1141
|
|
1142
|
-
The second render just defines the partial template we want to render, <tt>comments/form</tt>, Rails is smart enough to spot the forward slash in that string and
|
1142
|
+
The second render just defines the partial template we want to render, <tt>comments/form</tt>, Rails is smart enough to spot the forward slash in that string and realize that you want to render the <tt>_form.html.erb</tt> file in the <tt>app/views/comments</tt> directory.
|
1143
1143
|
|
1144
1144
|
The +@post+ object is available to any partials rendered in the view because we defined it as an instance variable.
|
1145
1145
|
|
@@ -1277,7 +1277,7 @@ Again, run the migration to create the database table:
|
|
1277
1277
|
$ rake db:migrate
|
1278
1278
|
</shell>
|
1279
1279
|
|
1280
|
-
Next, edit the +post.rb+ file to create the other side of the association, and to tell Rails (via the +
|
1280
|
+
Next, edit the +post.rb+ file to create the other side of the association, and to tell Rails (via the +accepts_nested_attributes_for+ macro) that you intend to edit tags via posts:
|
1281
1281
|
|
1282
1282
|
<ruby>
|
1283
1283
|
class Post < ActiveRecord::Base
|
@@ -1451,7 +1451,8 @@ h3. What's Next?
|
|
1451
1451
|
|
1452
1452
|
Now that you've seen your first Rails application, you should feel free to update it and experiment on your own. But you don't have to do everything without help. As you need assistance getting up and running with Rails, feel free to consult these support resources:
|
1453
1453
|
|
1454
|
-
* The "Ruby
|
1454
|
+
* The "Ruby on Rails guides":index.html
|
1455
|
+
* The "Ruby on Rails Tutorial":http://railstutorial.org/book
|
1455
1456
|
* The "Ruby on Rails mailing list":http://groups.google.com/group/rubyonrails-talk
|
1456
1457
|
* The "#rubyonrails":irc://irc.freenode.net/#rubyonrails channel on irc.freenode.net
|
1457
1458
|
* The "Rails Wiki":http://wiki.rubyonrails.org/
|
@@ -140,7 +140,7 @@ Ruby on Rails Guides
|
|
140
140
|
<p>This guide covers Rails integration with Rack and interfacing with other Rack components.</p>
|
141
141
|
<% end %>
|
142
142
|
|
143
|
-
<%= guide("
|
143
|
+
<%= guide("Creating and Customizing Rails Generators", 'generators.html') do %>
|
144
144
|
<p>This guide covers the process of adding a brand new generator to your extension
|
145
145
|
or providing an alternative to an element of a built-in Rails generator (such as
|
146
146
|
providing alternative test stubs for the scaffold generator).</p>
|
@@ -103,7 +103,7 @@ Now with Rails 3 we have a Gemfile which defines the basics our application need
|
|
103
103
|
<ruby>
|
104
104
|
source 'http://rubygems.org'
|
105
105
|
|
106
|
-
gem 'rails', '3.0.0
|
106
|
+
gem 'rails', '3.0.0'
|
107
107
|
|
108
108
|
# Bundle edge Rails instead:
|
109
109
|
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
@@ -133,15 +133,15 @@ Now with Rails 3 we have a Gemfile which defines the basics our application need
|
|
133
133
|
Here the only two gems we need are +rails+ and +sqlite3-ruby+, so it seems. This is until you run +bundle pack+. This command freezes all the gems required by your application into _vendor/cache_. The gems installed by default are:
|
134
134
|
|
135
135
|
* abstract-1.0.0.gem
|
136
|
-
* actionmailer-3.0.0.
|
137
|
-
* actionpack-3.0.0.
|
138
|
-
* activemodel-3.0.0.
|
139
|
-
* activerecord-3.0.0.
|
140
|
-
* activeresource-3.0.0.
|
141
|
-
* activesupport-3.0.0.
|
136
|
+
* actionmailer-3.0.0.gem
|
137
|
+
* actionpack-3.0.0.gem
|
138
|
+
* activemodel-3.0.0.gem
|
139
|
+
* activerecord-3.0.0.gem
|
140
|
+
* activeresource-3.0.0.gem
|
141
|
+
* activesupport-3.0.0.gem
|
142
142
|
* arel-0.4.0.gem
|
143
143
|
* builder-2.1.2.gem
|
144
|
-
* bundler-1.0.0.
|
144
|
+
* bundler-1.0.0.gem
|
145
145
|
* erubis-2.6.6.gem
|
146
146
|
* i18n-0.4.1.gem
|
147
147
|
* mail-2.2.5.gem
|
@@ -152,8 +152,8 @@ Here the only two gems we need are +rails+ and +sqlite3-ruby+, so it seems. This
|
|
152
152
|
* rack-1.2.1.gem
|
153
153
|
* rack-mount-0.6.12.gem
|
154
154
|
* rack-test-0.5.4.gem
|
155
|
-
* rails-3.0.0.
|
156
|
-
* railties-3.0.0.
|
155
|
+
* rails-3.0.0.gem
|
156
|
+
* railties-3.0.0.gem
|
157
157
|
* rake-0.8.7.gem
|
158
158
|
* sqlite3-ruby-1.3.1.gem
|
159
159
|
* text-format-1.0.0.gem
|
@@ -1375,7 +1375,7 @@ the _version_ file contains this code (comments stripped):
|
|
1375
1375
|
module VERSION #:nodoc:
|
1376
1376
|
MAJOR = 3
|
1377
1377
|
MINOR = 0
|
1378
|
-
TINY =
|
1378
|
+
TINY = 0
|
1379
1379
|
|
1380
1380
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
1381
1381
|
end
|
@@ -2250,18 +2250,18 @@ The method +find_with_root_flag+ is defined on +Rails::Engine+ (the superclass o
|
|
2250
2250
|
+called_from+ goes through the +caller+ which is the stacktrace of the current thread, in the case of your application it would go a little like this:
|
2251
2251
|
|
2252
2252
|
<pre>
|
2253
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0
|
2253
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/application.rb:30:in `inherited'
|
2254
2254
|
/home/you/yourapp/config/application.rb:4:in `<module:TestApp>'
|
2255
2255
|
/home/you/yourapp/config/application.rb:3:in `<top (required)>'
|
2256
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0
|
2257
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0
|
2258
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0
|
2259
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0
|
2260
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0
|
2261
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0
|
2262
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0
|
2263
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0
|
2264
|
-
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0
|
2256
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:167:in `require'
|
2257
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:167:in `block in require'
|
2258
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:537:in `new_constants_in'
|
2259
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:167:in `require'
|
2260
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:33:in `<top (required)>'
|
2261
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:167:in `require'
|
2262
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:167:in `block in require'
|
2263
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:537:in `new_constants_in'
|
2264
|
+
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:167:in `require'
|
2265
2265
|
/var/www/rboard/script/rails:10:in `<main>'
|
2266
2266
|
</pre>
|
2267
2267
|
|
@@ -2274,7 +2274,7 @@ The method +find_with_root_flag+ is defined on +Rails::Engine+ (the superclass o
|
|
2274
2274
|
end
|
2275
2275
|
</ruby>
|
2276
2276
|
|
2277
|
-
The +call_stack+ here is the +caller+ output shown previously, minus everything after the first +:+ on all the lines. The first path that matches this is _/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0
|
2277
|
+
The +call_stack+ here is the +caller+ output shown previously, minus everything after the first +:+ on all the lines. The first path that matches this is _/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails_. Yours may vary slightly, but should always end in _railties-x.x.x/lib/rails_.
|
2278
2278
|
|
2279
2279
|
The code in +find_root_with_flag+ will go up this directory structure until it reaches the top, which in this case is +/+.
|
2280
2280
|
|
@@ -76,7 +76,7 @@
|
|
76
76
|
<dt>Extending Rails</dt>
|
77
77
|
<dd><a href="plugins.html">The Basics of Creating Rails Plugins</a></dd>
|
78
78
|
<dd><a href="rails_on_rack.html">Rails on Rack</a></dd>
|
79
|
-
<dd><a href="generators.html">
|
79
|
+
<dd><a href="generators.html">Creating and Customizing Rails Generators</a></dd>
|
80
80
|
|
81
81
|
<dt>Contributing to Rails</dt>
|
82
82
|
<dd><a href="contributing_to_rails.html">Contributing to Rails</a></dd>
|
@@ -250,7 +250,7 @@ create_table :products do |t|
|
|
250
250
|
end
|
251
251
|
</ruby>
|
252
252
|
|
253
|
-
By default +create_table+ will create a primary key called +id+. You can change the name of the primary key with the +:primary_key+ option (don't forget to update the corresponding model) or if you don't want a primary key at all (for example for a HABTM join table) you can pass +:id => false+. If you need to pass database specific options you can place
|
253
|
+
By default +create_table+ will create a primary key called +id+. You can change the name of the primary key with the +:primary_key+ option (don't forget to update the corresponding model) or if you don't want a primary key at all (for example for a HABTM join table) you can pass +:id => false+. If you need to pass database specific options you can place an SQL fragment in the +:options+ option. For example
|
254
254
|
|
255
255
|
<ruby>
|
256
256
|
create_table :products, :options => "ENGINE=BLACKHOLE" do |t|
|
data/lib/rails/cli.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'rbconfig'
|
2
2
|
require 'rails/script_rails_loader'
|
3
3
|
|
4
|
+
# If we are inside a Rails application this method performs an exec and thus
|
5
|
+
# the rest of this script is not run.
|
4
6
|
Rails::ScriptRailsLoader.exec_script_rails!
|
5
7
|
|
6
8
|
railties_path = File.expand_path('../../lib', __FILE__)
|
data/lib/rails/deprecation.rb
CHANGED
@@ -35,7 +35,7 @@ module Rails
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
DeprecatedConstant.deprecate("RAILS_ROOT", "Rails.root.to_s")
|
39
|
-
DeprecatedConstant.deprecate("RAILS_ENV", "Rails.env")
|
40
|
-
DeprecatedConstant.deprecate("RAILS_DEFAULT_LOGGER", "Rails.logger")
|
38
|
+
DeprecatedConstant.deprecate("RAILS_ROOT", "::Rails.root.to_s")
|
39
|
+
DeprecatedConstant.deprecate("RAILS_ENV", "::Rails.env")
|
40
|
+
DeprecatedConstant.deprecate("RAILS_DEFAULT_LOGGER", "::Rails.logger")
|
41
41
|
end
|
@@ -355,6 +355,8 @@ module Rails
|
|
355
355
|
def app_name
|
356
356
|
@app_name ||= File.basename(destination_root)
|
357
357
|
end
|
358
|
+
|
359
|
+
alias_method :defined_app_name, :app_name
|
358
360
|
|
359
361
|
def defined_app_const_base
|
360
362
|
Rails.respond_to?(:application) && defined?(Rails::Application) &&
|
@@ -362,6 +364,7 @@ module Rails
|
|
362
364
|
end
|
363
365
|
|
364
366
|
def app_const_base
|
367
|
+
defined_app_name # ensures the correct app_name if it's already defined
|
365
368
|
@app_const_base ||= defined_app_const_base || app_name.gsub(/\W/, '_').squeeze('_').camelize
|
366
369
|
end
|
367
370
|
|
data/lib/rails/tasks/routes.rake
CHANGED
@@ -1,35 +1,28 @@
|
|
1
1
|
desc 'Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.'
|
2
2
|
task :routes => :environment do
|
3
3
|
Rails.application.reload_routes!
|
4
|
-
|
5
|
-
all_routes = Rails.application.routes.routes
|
6
|
-
named_routes = Rails.application.routes.named_routes.routes
|
4
|
+
all_routes = Rails.application.routes.routes
|
7
5
|
|
8
6
|
if ENV['CONTROLLER']
|
9
7
|
all_routes = all_routes.select{ |route| route.defaults[:controller] == ENV['CONTROLLER'] }
|
10
8
|
end
|
11
9
|
|
12
10
|
routes = all_routes.collect do |route|
|
13
|
-
# TODO: The :index method is deprecated in 1.9 in favor of :key
|
14
|
-
# but we don't have :key in 1.8.7. We can remove this check when
|
15
|
-
# stop supporting 1.8.x
|
16
|
-
key = Hash.method_defined?('key') ? 'key' : 'index'
|
17
|
-
name = named_routes.send(key, route).to_s
|
18
11
|
|
19
12
|
reqs = route.requirements.dup
|
20
|
-
reqs[:to] = route.app unless route.app.
|
13
|
+
reqs[:to] = route.app unless route.app.class.name.to_s =~ /^ActionDispatch::Routing/
|
21
14
|
reqs = reqs.empty? ? "" : reqs.inspect
|
22
15
|
|
23
|
-
{:name => name, :verb => route.verb.to_s, :path => route.path, :reqs => reqs}
|
16
|
+
{:name => route.name.to_s, :verb => route.verb.to_s, :path => route.path, :reqs => reqs}
|
24
17
|
end
|
25
18
|
|
26
|
-
routes.reject! { |r| r[:path]
|
19
|
+
routes.reject! { |r| r[:path] =~ %r{/rails/info/properties} } # Skip the route if it's internal info route
|
27
20
|
|
28
|
-
name_width = routes.map{ |r| r[:name] }.
|
29
|
-
verb_width = routes.map{ |r| r[:verb] }.
|
30
|
-
path_width = routes.map{ |r| r[:path] }.
|
21
|
+
name_width = routes.map{ |r| r[:name].length }.max
|
22
|
+
verb_width = routes.map{ |r| r[:verb].length }.max
|
23
|
+
path_width = routes.map{ |r| r[:path].length }.max
|
31
24
|
|
32
25
|
routes.each do |r|
|
33
26
|
puts "#{r[:name].rjust(name_width)} #{r[:verb].ljust(verb_width)} #{r[:path].ljust(path_width)} #{r[:reqs]}"
|
34
27
|
end
|
35
|
-
end
|
28
|
+
end
|
data/lib/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railties
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 7
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
9
|
- 0
|
10
|
-
|
11
|
-
version: 3.0.0.rc2
|
10
|
+
version: 3.0.0
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- David Heinemeier Hansson
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-29 00:00:00 -05:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
@@ -27,12 +26,12 @@ dependencies:
|
|
27
26
|
requirements:
|
28
27
|
- - ">="
|
29
28
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
29
|
+
hash: 55
|
31
30
|
segments:
|
32
31
|
- 0
|
33
32
|
- 8
|
34
|
-
-
|
35
|
-
version: 0.8.
|
33
|
+
- 4
|
34
|
+
version: 0.8.4
|
36
35
|
type: :runtime
|
37
36
|
version_requirements: *id001
|
38
37
|
- !ruby/object:Gem::Dependency
|
@@ -59,13 +58,12 @@ dependencies:
|
|
59
58
|
requirements:
|
60
59
|
- - "="
|
61
60
|
- !ruby/object:Gem::Version
|
62
|
-
hash:
|
61
|
+
hash: 7
|
63
62
|
segments:
|
64
63
|
- 3
|
65
64
|
- 0
|
66
65
|
- 0
|
67
|
-
|
68
|
-
version: 3.0.0.rc2
|
66
|
+
version: 3.0.0
|
69
67
|
type: :runtime
|
70
68
|
version_requirements: *id003
|
71
69
|
- !ruby/object:Gem::Dependency
|
@@ -76,13 +74,12 @@ dependencies:
|
|
76
74
|
requirements:
|
77
75
|
- - "="
|
78
76
|
- !ruby/object:Gem::Version
|
79
|
-
hash:
|
77
|
+
hash: 7
|
80
78
|
segments:
|
81
79
|
- 3
|
82
80
|
- 0
|
83
81
|
- 0
|
84
|
-
|
85
|
-
version: 3.0.0.rc2
|
82
|
+
version: 3.0.0
|
86
83
|
type: :runtime
|
87
84
|
version_requirements: *id004
|
88
85
|
description: "Rails internals: application bootup, plugins, generators, and rake tasks."
|
@@ -442,14 +439,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
442
439
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
443
440
|
none: false
|
444
441
|
requirements:
|
445
|
-
- - "
|
442
|
+
- - ">="
|
446
443
|
- !ruby/object:Gem::Version
|
447
|
-
hash:
|
444
|
+
hash: 3
|
448
445
|
segments:
|
449
|
-
-
|
450
|
-
|
451
|
-
- 1
|
452
|
-
version: 1.3.1
|
446
|
+
- 0
|
447
|
+
version: "0"
|
453
448
|
requirements: []
|
454
449
|
|
455
450
|
rubyforge_project: rails
|