Commit Graph

29379 Commits

Author SHA1 Message Date
schneems
2314490547 document -e argument for rails console
this adds documentation for -e flag which sets the environment of the rails console like the `rails server` command.
2012-03-24 17:24:22 -05:00
Panayotis Matsinopoulos
c12b886955 Testing layout gotcha when view renders partial 2012-03-24 23:33:41 +02:00
Panayotis Matsinopoulos
5b35664481 Small layout correction 2012-03-24 23:16:55 +02:00
Panayotis Matsinopoulos
214b0ddee7 Testing Template and Layout Example 2012-03-24 23:12:39 +02:00
Waseem Ahmad
9ff2e928ef Use one 'be'. 2012-03-24 20:26:44 +05:30
Alexey Vakhov
23b3ea5324 Fix AC actions caching comment 2012-03-24 17:22:24 +04:00
Alexey Vakhov
6880489e25 ActionController caching small String#split optimization 2012-03-24 17:10:15 +04:00
Senthil A
7feec40b89 [ci skip] updated bin/rails code in Rails Initialization Process guide 2012-03-24 06:06:56 -07:00
Vijay Dev
014498e1d7 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	guides/source/ruby_on_rails_guides_guidelines.textile
2012-03-24 17:15:10 +05:30
Vijay Dev
780ab58209 Merge pull request #5569 from arunagw/warning_remove_master
removed warning: shadowing outer local variable - exception
2012-03-24 04:25:52 -07:00
Vijay Dev
2fab826db0 spacing fix in guide [ci skip] 2012-03-24 14:23:06 +05:30
Arun Agrawal
ef864c3a22 removed warning: shadowing outer local variable - exception 2012-03-24 10:35:36 +05:30
Aaron Patterson
beb51b4d5f Merge pull request #5567 from tpope/xhr-boolean
Return an actual boolean from xml_http_request?
2012-03-23 17:27:14 -07:00
Tim Pope
6349791d5a Return an actual boolean from xml_http_request? 2012-03-23 20:19:38 -04:00
Fabián Rodríguez
b99d95d838 [getting started][ci skip] fix link to the code 2012-03-23 18:15:02 -03:00
Sergey Nartimov
2ee28b2bf8 fix HashWithIndifferentAccess.[] method 2012-03-23 23:09:29 +03:00
Aaron Patterson
ea482d366a oops, forgot to commit the tests! 💣 2012-03-23 11:47:42 -07:00
Aaron Patterson
7422f44364 chdir before globbing so that we don't need to escape directory names.
fixes #5521
2012-03-23 11:47:42 -07:00
Aaron Patterson
e944b296a9 Merge pull request #5550 from schneems/schneems/server_env
Fix environment support for rails server, and match interface of rails console
2012-03-23 10:36:16 -07:00
José Valim
86cd1b1d46 Merge pull request #5518 from rafaelfranca/minor-refactor
Remove code duplication
2012-03-23 09:35:31 -07:00
Piotr Sarnacki
9a26c9035f Merge pull request #5556 from rafaelfranca/remove-warning
use the new scope syntax on the tests to avoid DEPRECATION WARNINGS.
2012-03-23 06:48:42 -07:00
Rafael Mendonça França
ab287c5319 Use the new scope syntax 2012-03-23 10:32:51 -03:00
José Valim
35e8de6344 Merge pull request #5374 from nertzy/remove_deprecated_partial_path_from_active_model_naming
Remove ActiveModel::Naming#partial_path
2012-03-23 05:57:35 -07:00
Carlos Antonio da Silva
7a0cf2f529 Properly deprecate the block argument in AV FormBuilder
Commit 56089ca986c767763f29159c8de0aa1ebabfd4d2 introduced a backward
incompatible change by changing the method signature of the FormBuilder.
This brings back the same method signature warning in case someone gives
a block to the builder.

More info: 56089ca986 (commitcomment-1116166)
2012-03-23 09:10:59 -03:00
Piotr Sarnacki
d1887d384a Fix tests, when creating rescue handler, we need to check for arity now
Before it was handled by Proc.bind, but since Proc.bind has been
deprecated, this is no longer the case and returned handler
needs to match rescuer.
2012-03-23 11:49:25 +01:00
Mikhail Dieterle
44ef59f40b :foreign_key option should be on has_many side of association 2012-03-23 18:30:16 +08:00
Piotr Sarnacki
39961f8099 Merge pull request #5546 from mptre/master
Fixed missing space bug introduces in rails/rails@9299bfd
2012-03-23 03:06:42 -07:00
Aaron Patterson
b4115fdbc0 properly namespace the fixture exception 2012-03-22 16:25:48 -07:00
Aaron Patterson
fad83d8cbb Merge pull request #5552 from lest/patch-3
deprecate Proc#bind that can cause symbol memory leak
2012-03-22 15:31:45 -07:00
Sergey Nartimov
9c857db757 deprecate Proc#bind that can cause symbol memory leak 2012-03-22 22:25:55 +03:00
schneems
7529283732 match rails console environment support, to server
rails server takes `-e` as an argument to specify RAILS_ENV, rails console currently does not have the same interface. This commit fixes this disparity so developers can manually specify `RAILS_ENV` or can pass in an environment with a `-e`.
2012-03-22 13:13:12 -04:00
Joe Goggins
65a3020851 Adding documentation for ActiveRecord::Base.abstract_class to clarify a particular usecase for this feature (to allow you to use inheritance in ActiveRecord without using the STI table name 2012-03-22 10:02:08 -05:00
Anton Lindqvist
c5f4b20275 Fixed missing space bug introduces in rails/rails@9299bfdcd3. 2012-03-22 12:25:28 +01:00
adman65
d3223b5b65 Update config.assets.initialize_on_precompile warning to include engine side affects 2012-03-22 12:10:52 +01:00
adman65
5fdcda8b22 [engines] [ci-skip] Add example of precompiling engine assets 2012-03-22 12:05:28 +01:00
kucaahbe
152798f6a6 improvements in "caching_with_rails" guide 2012-03-22 11:39:46 +02:00
Piotr Sarnacki
64249223eb Merge pull request #5540 from mhfs/another_blank_line_fix
Avoid another blank line in generated migration and remove assertion as per @spastorino request
2012-03-21 18:03:17 -07:00
Aaron Patterson
b6c128d6d0 remove duplicate requires. thanks @atambo 2012-03-21 16:42:28 -07:00
Aaron Patterson
c7847f14fd evented listeners can subscribe to any message 2012-03-21 16:18:47 -07:00
Aaron Patterson
6989db9238 evented subscribers work 2012-03-21 16:18:47 -07:00
Aaron Patterson
f08f8750a5 start / finish events are sent by the instrumenter 2012-03-21 16:18:46 -07:00
Aaron Patterson
60736fec53 push the autoloads up to requires 2012-03-21 16:18:46 -07:00
Marcelo Silveira
86d1dfb821 Avoid another blank line in generated migration and remove assertion as per @spastorino request 2012-03-21 19:28:34 -03:00
Jon Leighton
0a12a5f816 Deprecate eager-evaluated scopes.
Don't use this:

    scope :red, where(color: 'red')
    default_scope where(color: 'red')

Use this:

    scope :red, -> { where(color: 'red') }
    default_scope { where(color: 'red') }

The former has numerous issues. It is a common newbie gotcha to do
the following:

    scope :recent, where(published_at: Time.now - 2.weeks)

Or a more subtle variant:

    scope :recent, -> { where(published_at: Time.now - 2.weeks) }
    scope :recent_red, recent.where(color: 'red')

Eager scopes are also very complex to implement within Active
Record, and there are still bugs. For example, the following does
not do what you expect:

    scope :remove_conditions, except(:where)
    where(...).remove_conditions # => still has conditions
2012-03-21 22:18:18 +00:00
Jon Leighton
fd68bd23b6 Avoid obscure &Proc.new thing 2012-03-21 20:37:22 +00:00
Jon Leighton
f6db31ec16 Remove valid_scope_name? check - use ruby
scope is syntactic sugar for defining a class method. Ruby allows
redefining methods but emits a warning when run with -w. So let's
not implement our own logic for this. Users should run with -w if they
want to be warned about redefined methods.
2012-03-21 20:30:48 +00:00
Jon Leighton
884e5b7558 no need for cast 2012-03-21 20:25:51 +00:00
Jon Leighton
7c1275a005 no need for lvar 2012-03-21 20:23:46 +00:00
Aaron Patterson
d99c790f65 split subscribers based on pattern type 2012-03-21 11:12:58 -07:00
José Valim
14b2cf6a0a Merge pull request #5532 from mhfs/migration_blank_line
Remove blank line from generated migration
2012-03-21 00:34:38 -07:00