Commit Graph

27815 Commits

Author SHA1 Message Date
Carlos Antonio da Silva
cd9a3b055d Fix custom validation methods section in AR validations and callbacks guide
The methods validate_on_create and validate_on_update are not available
anymore in Rails, this removes them from the guide and adds an example
on how to use validate with the :on option.
2012-01-25 09:10:36 -02:00
Rohit Arondekar
8728575f10 remove extra 'the' 2012-01-25 10:35:51 +05:30
leprasmurf
fce92fd8a7 Added Apache configuration for dynamic gzip content 2012-01-23 14:13:33 -05:00
ciastek
2bcfdec227 use CamelCase convention for "tag" model name 2012-01-23 09:48:34 +01:00
Damian Le Nouaille
342f84ad45 example bracket error 2012-01-23 01:15:51 +01:00
ciastek
b59e7b9ea3 "will be used throughout all the views for posts." could suggest, that code's modification is somehow related to posts, while it's application-wide 2012-01-23 00:58:40 +01:00
Lennart Fridén
82f645383e Documented the :use_two_digit_numbers option 2012-01-22 16:28:44 +01:00
Aleksey Gureiev
021a101274 Fixed typo in 'cast'. 2012-01-21 20:23:14 +02:00
Vijay Dev
2d000328df Merge branch 'master' of github.com:lifo/docrails 2012-01-21 21:26:10 +05:30
Vijay Dev
76fecac919 Revert "Fixed typo in 'cast'."
This reverts commit ecac7c96451ee8d85ca602c9ce3416a5e7ef6a03.

Reason: Changelogs are not meant to be changed from docrails.
2012-01-21 21:24:48 +05:30
José Valim
a50382cacd Merge pull request #4573 from amatsuda/ar_default_timezone_utc
change AR default_timezone to :utc since it's the default for AR::Railtie
2012-01-21 04:22:59 -08:00
José Valim
c05f3b0e4f Merge pull request #4572 from semaperepelitsa/noregexp
Replace regexp matching with a simple string manipulation.
2012-01-21 03:08:19 -08:00
Akira Matsuda
bd60339963 change AR default_timezone to :utc since it's the default for AR::Railtie 2012-01-21 20:07:12 +09:00
Semyon Perepelitsa
bb1813cab8 Replace regexp matching with a simple string manipulation.
Using regexp looks like overkill here and is also 2x slower.

             user     system      total        real
string   0.020000   0.000000   0.020000 (  0.016256)
regexp   0.030000   0.000000   0.030000 (  0.035360)

require "benchmark"

names = ("a".."z").map { |c| c + "a" * rand(5..10) + "=" * rand(0..1) }.map(&:to_sym)
puts names

n = 1000
Benchmark.bmbm do |x|
  x.report "string" do
    n.times do
      names.each do |name|
        string_name = name.to_s
        string_name.chomp!('=')
        string_name
      end
    end
  end

  x.report "regexp" do
    n.times do
      names.each do |name|
        name.to_s =~ /(.*)=$/
        $1
      end
    end
  end
end
2012-01-21 18:32:17 +08:00
Semyon Perepelitsa
1729720871 Why do we even need a constant here? A variable is fine. 2012-01-21 17:44:05 +08:00
Semyon Perepelitsa
b7bf3c1a11 TaggedLogging wraps an object, not a class. 2012-01-21 17:37:42 +08:00
Semyon Perepelitsa
717510757d Do not use the same Logger constant for class (from stdlib) and for instance (from the example) 2012-01-21 17:34:04 +08:00
José Valim
2e13850e4c Merge pull request #4560 from rafaelfranca/av-number_helper-refactor
Refactor NumberHelpers
2012-01-20 23:45:00 -08:00
Aaron Patterson
90410b4c3a stop splatting so much. We don't need args everywhere 2012-01-20 14:39:55 -08:00
Aaron Patterson
cb6ccadceb broadcasting to the console and remove file tailing middleware 2012-01-20 14:19:21 -08:00
Aaron Patterson
a0da46ecaf pushed broadcasting down to a module 2012-01-20 14:18:29 -08:00
Aaron Patterson
f02cec3c49 defined the actual logger signature 2012-01-20 13:36:18 -08:00
Aaron Patterson
983bf6d456 restored logging to the log file and display on the console 2012-01-20 11:57:07 -08:00
Aaron Patterson
14d1029aa3 fixed test for more informative message 2012-01-20 11:57:07 -08:00
Aaron Patterson
e7e1890c49 made the broadcast logger quack more like a logger 2012-01-20 11:57:07 -08:00
Aaron Patterson
04241f38f6 added the backtrace so errors can be found 2012-01-20 11:57:07 -08:00
Aaron Patterson
d42b3d4347 add a broadcasting logger so we can split logs 2012-01-20 11:57:07 -08:00
Aleksey Gureiev
ecac7c9645 Fixed typo in 'cast'. 2012-01-20 21:42:34 +02:00
Rafael Mendonça França
977f6b4978 Refactor translations retrieval 2012-01-20 16:37:48 -03:00
Rafael Mendonça França
f170453493 Remove code duplication 2012-01-20 16:26:45 -03:00
Jon Leighton
30b0e5848c Fix another race condition.
From 2c667f69aa2daac5ee6c29ca9679616e2a71532a.

Thanks @pwnall for the heads-up.
2012-01-20 18:32:27 +00:00
Aaron Patterson
de41f5a979 Merge pull request #4528 from j-manu/log-tailer-fix
Fix for log tailer when the log file doesn't exist.
2012-01-20 10:23:46 -08:00
Aaron Patterson
8c2dc4cd04 Merge pull request #4556 from brainopia/remove_old_cruft
Removed unused assigns from ActionView::Template::Error
2012-01-20 10:06:45 -08:00
José Valim
712b0b99a2 Merge pull request #4557 from rafaelfranca/av-number_helper-refactor
No need to check html_safe? twice at number_to_percentage
2012-01-20 09:38:46 -08:00
Aaron Patterson
79f7bbb003 Revert "just use an alias. The target method is public, so make this one public"
This reverts commit be7d2248e9505983d1aacf0b33c657e6e3ddd9db.
2012-01-20 09:33:58 -08:00
Rafael Mendonça França
01b4a7c1f4 No need to check html_safe? twice 2012-01-20 14:32:07 -03:00
Benjamin Manns
253ef4f0a8 Merge pull request #78 from trotter/fix-rails-engine-docs
Fix documentation bug in Rails::Engine
2012-01-20 09:11:20 -08:00
brainopia
73709f7ffa Removed unused assigns from ActionView::Template::Error
They existed since initial rails commit by DHH but lost use a long time
ago
2012-01-20 20:13:29 +04:00
Jonathan Roes
83e891cf94 document :raise option support for several helpers [ci skip] 2012-01-20 10:15:34 -05:00
José Valim
a2d0b99457 Merge pull request #4555 from kennyj/mail_bump
Bump mail 2.4.1
2012-01-20 06:29:12 -08:00
kennyj
52287f95ab Bump mail 2012-01-20 23:14:46 +09:00
José Valim
c08ea0ac8e Merge pull request #4554 from rodrigoflores/master
Added the :format option to number_to_percentage
2012-01-20 05:59:10 -08:00
Vijay Dev
3e6e57e7fd Merge pull request #4545 from trotter/fix-documentation-bug
Fix documentation bug in Rails::Engine
2012-01-20 05:28:19 -08:00
Rodrigo Flores
c0a3fe3c03 Added format to percentage 2012-01-20 10:42:02 -02:00
Xavier Noria
616c5aef23 Merge pull request #79 from doriath/master
Fix indentation in comment of Delegation module
2012-01-20 01:17:13 -08:00
Tomasz Zurkowski
665322eaab Fix indentation in code example of Delegation 2012-01-20 10:01:22 +01:00
Aaron Patterson
eb1b729408 push ivar initialization down to a common method 2012-01-19 18:32:58 -08:00
Aaron Patterson
17064acb3e adding tests for previous_changes hash 2012-01-19 18:25:14 -08:00
Aaron Patterson
be7d2248e9 just use an alias. The target method is public, so make this one public
too.
2012-01-19 17:35:18 -08:00
Aaron Patterson
0c356109ff remove unused captures 2012-01-19 17:08:53 -08:00