Ankit Gupta
9f85c41eec
Typo fix [skip ci]
2013-07-12 21:29:31 +01:00
Yves Senn
3af7b16c11
add test-case to verify error.path
when a helper was not found.
...
This verifies the code added with:
99c9d18601
2013-07-12 15:40:47 +02:00
Yves Senn
5bee14f3a4
move MissingHelperError
out of the ClassMethods
module.
2013-07-12 15:34:29 +02:00
Yves Senn
d864dcd02a
Merge pull request #11401 from dpdawson/master
...
Improved Active View Overview guide. [ci skip]
2013-07-12 01:51:37 -07:00
Daniel Dawson
9cf1f9e6f5
Improve Active View Overview guide. [ci skip]
2013-07-12 09:43:05 +01:00
Rafael Mendonça França
55f8f63ad8
Documment config.log_formatter added on 51aeae91
...
[ci skip]
2013-07-11 16:02:06 -03:00
Yves Senn
424d840efb
Merge pull request #11400 from dpdawson/master
...
Fix a grammatical error/typo in Active Record Associations guide. [ci skip]
2013-07-11 04:50:00 -07:00
Daniel Dawson
8cece08ce3
Fix a grammatical error/typo in Active Record Associations guide.
2013-07-11 12:09:59 +01:00
Akira Matsuda
2692e38efa
Add missing require
2013-07-11 18:53:54 +09:00
Akira Matsuda
5ff00fcd3d
Array#to_formatted_s does not call each element's to_s anymore
...
Array#to_s calls each element's inspect since ruby 1.9
2013-07-11 18:21:11 +09:00
Andrew White
07a4c76a07
Only raise DelegationError if it's is the source of the exception
...
This fixes situations where nested NoMethodError exceptions are masked
by delegations. This would cause confusion especially where there was a
problem in the Rails booting process because of a delegation in the
routes reloading code.
Fixes #10559
2013-07-11 09:05:32 +01:00
José Valim
e7e81b4580
Merge pull request #11389 from jetthoughts/11381_fix_hit_database_on_precompile
...
#11381 : Ignore config.eager_load=true for rake
2013-07-10 11:46:17 -07:00
Paul Nikitochkin
9cac69c602
#11381 : Ignore config.eager_load=true for rake
...
Closes #11381
2013-07-10 21:43:15 +03:00
Steve Klabnik
ddf79ab15b
Merge pull request #11394 from robin850/patch-8
...
Add documentation for add_flash_types [ci skip]
2013-07-10 11:39:31 -07:00
Robin Dupret
b163754bc5
Add documentation for add_flash_types [ci skip]
...
Document a little bit the ActionController::Flash::add_flash_types
class method.
2013-07-10 20:55:05 +02:00
Andrew White
78f7d5b652
Add missing require so that DateTime has the right superclass
...
If the DateTime core extensions were loaded before the Date core extensions
then you would get a superclass mismatch as DateTime hasn't been defined
yet so it gets set to Object by the acts_like core extension.
Fixes #11206
2013-07-10 16:11:33 +01:00
Andrew White
4d733d2dd4
Add failing test for #9562
...
Rails 4.0.0 fails when trying to encode an ActiveSupport::TimeWithZone
that wraps a DateTime instance. This is fixed on master so add a test
to prevent regression.
(cherry picked from commit ad01b8da354268cebfae1519c28d19d75576ccb1)
2013-07-10 15:49:09 +01:00
Akira Matsuda
dabcfc4914
Better not mutate the given options Hash
2013-07-10 23:31:02 +09:00
Rafael Mendonça França
ddee6f24a5
Merge pull request #11391 from schuetzm/remove-swp-file
...
Remove accidentally committed vi .swp file.
2013-07-10 07:15:49 -07:00
Marc Schütz
90e420e406
Remove accidentally committed vi .swp file.
2013-07-10 16:06:40 +02:00
Akira Matsuda
50e11e9897
Simplify Array#in_groups_of code
2013-07-10 22:59:32 +09:00
Akira Matsuda
f660abce9a
Speed up Array#split
...
Benchmark:
user system total real
old 0.510000 0.000000 0.510000 ( 0.506749)
new 0.330000 0.000000 0.330000 ( 0.336187)
2013-07-10 22:59:32 +09:00
Akira Matsuda
453617006a
Speed up String#truncate
...
Benchmark:
user system total real
old 1.550000 0.040000 1.590000 ( 1.585866)
new 1.250000 0.040000 1.290000 ( 1.287693)
2013-07-10 22:59:32 +09:00
Yves Senn
af4b6545ee
Merge pull request #10642 from LTe/invalid-load-error
...
Show real LoadError on helpers require
2013-07-10 05:24:53 -07:00
Akira Matsuda
261da32a84
Speed up AS::Inflector.underscore
...
Benchmark:
user system total real
old 6.090000 0.120000 6.210000 ( 6.202039)
new 5.930000 0.110000 6.040000 ( 6.042022)
2013-07-10 19:09:16 +09:00
Piotr Niełacny
e0438b1c07
Show real LoadError on helpers require
...
When helper try to require missing file rails will throw exception about
missing helper.
# app/helpers/my_helper.rb
require 'missing'
module MyHelper
end
And when we try do load helper
class ApplicationController
helper :my
end
Rails will throw exception. This is wrong because there is a helper
file.
Missing helper file helpers/my_helper.rb
Now when helper try to require non-existed file rails will throw proper
exception.
No such file to load -- missing
2013-07-10 11:26:43 +02:00
Akira Matsuda
ff8cbdd05b
Speedup AS::Inflector.camelize
...
Benchmark:
user system total real
old 5.960000 0.020000 5.980000 ( 5.981754)
new 5.740000 0.030000 5.770000 ( 5.757201)
2013-07-10 17:41:41 +09:00
Akira Matsuda
cd0d5902dd
Speedup AS::Inflector.deconstantize
...
Benchmark:
user system total real
old 0.740000 0.000000 0.740000 ( 0.744358)
new 0.550000 0.000000 0.550000 ( 0.553690)
2013-07-10 17:14:33 +09:00
Akira Matsuda
2ef1fb2c45
Speedup String#to
...
Benchmark:
1000000.times { str.to(30) }
user system total real
old 0.490000 0.110000 0.600000 ( 0.607374)
new 0.390000 0.000000 0.390000 ( 0.387306)
2013-07-10 16:32:04 +09:00
Akira Matsuda
956671831d
Avoid creating an extra Range instance
2013-07-10 16:23:04 +09:00
Matt Stopa
3c90f7a258
Add documentation for FileStore#increment and #decrement
...
[ci skip]
2013-07-10 00:08:10 -06:00
Matt Stopa
d06a98b7d9
Add documentation for #clear on certain Store classes
...
[ci skip
2013-07-10 00:02:21 -06:00
Matt Stopa
b50bd49aa2
Update the filestore documentation for clear
...
[ci skip]
2013-07-09 23:19:14 -06:00
Rafael Mendonça França
54d893f9d8
Merge pull request #11385 from MarceloCajueiro/remove_string_interpolation
...
Remove unnecessary string interpolation
2013-07-09 19:56:56 -07:00
Marcelo G. Cajueiro
07e7c099b5
Remove unnecessary string interpolation
...
Removed from controller template of scaffold generator.
2013-07-09 21:30:34 -03:00
Aaron Patterson
a4c0281dad
fix visibility of the relation construction methods
2013-07-09 17:24:10 -07:00
Aaron Patterson
8004c91eb6
pass arel to select_all rather than depend on method_missing
2013-07-09 17:18:52 -07:00
Rafael Mendonça França
4b6886a140
Merge pull request #11383 from mattdbridges/simple-format-doc-fix
...
Fix simple_format output example ending tag
2013-07-09 12:12:08 -07:00
Matt Bridges
7e1cb39f72
Fix simple_format output example ending tag
2013-07-09 14:09:26 -05:00
Akira Matsuda
54eee8b5f2
Make sure that a joins Relation can be merged with has_many :through + association proxy
...
Closes #11248 .
2013-07-10 00:40:11 +09:00
Andrew White
c42260a325
Return local time for backwards compatibility
2013-07-09 15:50:14 +01:00
Rafael Mendonça França
37d1e48dfe
Merge pull request #11378 from wangjohn/class_for_application_generator
...
Creating a class to handle preparing ARGV.
2013-07-09 06:14:06 -07:00
Andrew White
1b3873730b
Retain UTC offset when using Time.at_with_coercion
...
The standard Ruby behavior for Time.at is to return the same type of
time when passing an instance of Time as a single argument. Since the
an ActiveSupport::TimeWithZone instance may be a different timezone than
the system timezone and DateTime just understands offsets the best we
can do is to return an instance of Time with the correct offset.
Fixes #11350 .
2013-07-09 13:43:56 +01:00
Neer Friedman
484253515c
Fix microsecond precision of Time#at_with_coercion
...
When Time.at_with_coercion (wraps Time.at) is called with a single
argument that "acts_like?(:time)" it is coerced to integer thus losing
it's microsecond percision.
This commits changes this to use `#to_f` to prevent the problem
2013-07-09 13:43:56 +01:00
wangjohn
929e5b5b8b
Creating a class to handle preparing ARGV.
...
Before the AppGenerator is started, ARGV needs to be modified to
correctly account for some things. I'm extracting these out into their
own class.
2013-07-09 08:29:07 -04:00
Rafael Mendonça França
1a6eb1e560
Merge pull request #11372 from wangjohn/fixing_rails_commands_class
...
Using the instance variable for argv.
2013-07-09 05:25:34 -07:00
wangjohn
0c5d8f813c
Using the instance variable for argv.
...
Instead of using the global constant ARGV, we're changing to using the
instance variable because it is more testable.
2013-07-09 08:21:54 -04:00
Rafael Mendonça França
1ccbf7d76a
Merge pull request #11375 from namusyaka/fix_attribute_for_inspect
...
Fix: attribute_for_inspect truncate upto (51 => 50) characters.
2013-07-09 04:44:43 -07:00
namusyaka
a8bd220768
Fix: attribute_for_inspect truncate upto (51 => 50) characters.
2013-07-09 20:01:48 +09:00
Rafael Mendonça França
f9fec4f46b
Merge pull request #11174 from vipulnsward/remove_column_passing
...
Stop sending column info to `substitute_at` as it doesn't get utilized.
2013-07-09 02:58:15 -07:00