Commit Graph

24159 Commits

Author SHA1 Message Date
Vijay Dev
4885e5d3eb minor corrections in form helpers guide and api docs 2011-07-20 00:03:28 +05:30
Vijay Dev
09dd03095a some corrections in assets pipeline guide 2011-07-20 00:03:28 +05:30
Evan Machnic
0cf5160a80 Capitalization compliance for asset_pipeline doc 2011-07-19 13:36:50 -04:00
Santiago Pastorino
30289c7683 Merge pull request #2148 from norman/master
Explicitly require Active Support dependencies (master)
2011-07-19 06:38:20 -07:00
Norman Clarke
9db2d10b11 Explicitly require Active Support dependencies
This fixes errors when using Active Record outside of Rails. In Rails,
these files are required by other classes that are always loaded, so
this error does not happen.

Without core_ext/module/delegation, a NoMethodError is raised because
`delegate` remains undefined.

Without core_ext/class/attribute_acessors, an ArgumentError is raised because
`delegate` does not receive a value for its :to option.
2011-07-19 09:56:02 -03:00
Vijay Dev
db655ec7a6 Revert "notextile tag has been placed with ascii quotes"
This reverts commit 3e6052a430912b096056ae3d9a685b04767a4d19.

Reason: Code changes are not allowed in docrails (even if they are related to guides generation)
2011-07-19 12:18:23 +05:30
JudeArasu
3e6052a430 notextile tag has been placed with ascii quotes 2011-07-19 06:41:20 +05:30
Santiago Pastorino
73efb68dc9 Merge pull request #2139 from mcmire/issue_2078_master
Fix for #2078 (against master)
2011-07-18 17:27:21 -07:00
Xavier Noria
aaff90ac7f Merge pull request #2141 from joshk/master
Config files to get Rails on Travis-CI
2011-07-18 14:34:18 -07:00
Elliot Winkler
0e1d617b8b ActiveRecord: Fix eager loading so that giving a blank order clause generates valid SQL 2011-07-18 14:56:37 -06:00
JudeArasu
01040b5dc9 notextile tag has been placed with ascii quotes 2011-07-19 01:33:45 +05:30
José Valim
b475f74da5 Merge pull request #2133 from jstorimer/ensure-status-codes-are-logged-properly
Ensure that status codes are logged properly
2011-07-18 11:05:37 -07:00
Jesse Storimer
ac81af40c0 Ensure that status codes are logged properly
Needed to move AC::Metal::Instrumentation before AM::Metal::Rescue
so that status codes rendered from rescue_from blocks are logged
properly.
2011-07-18 13:42:07 -04:00
Santiago Pastorino
8efc0f1f34 Merge pull request #2116 from guilleiguaran/fix-environment-generator-action
Fix Rails::Generators::Actions#environment when env is passed
2011-07-18 10:00:08 -07:00
Guillermo Iguaran
fcdcc87a08 Fix Rails::Generators::Actions#environment when env is passed. Closes #2110 2011-07-18 10:43:25 -05:00
José Valim
da144894e9 Merge pull request #195 from bigfix/active_model_include_serialization
ActiveModel support for the :include serialization option
2011-07-18 06:50:43 -07:00
José Valim
44e83ac341 Merge pull request #2075 from lawrencepit/match_attribute_method
Optimization of ActiveModel's match_attribute_method?
2011-07-18 06:46:31 -07:00
Jon Leighton
50941ec07c Merge pull request #2128 from sikachu/master-dynamic_finder
Raise an ArgumentError if user passing less number of argument in the dynamic finder
2011-07-18 01:24:33 -07:00
Ryan Bigg
2f69469479 Complete another review of asset pipeline guide 2011-07-18 16:28:22 +10:00
Aaron Patterson
1e452f1840 make tzinfo a development dependency 2011-07-18 14:28:14 +09:00
Prem Sichanugrist
4443905169 Refactor test case to use anonymous class - Thank you @tenderlove 2011-07-18 00:37:06 -04:00
Santiago Pastorino
adc7097dc0 Merge pull request #2124 from arunagw/render_partial_invalid_check_fix
Checking with to_s. As regexp fail with 1.8.7
2011-07-17 20:14:12 -07:00
Jon Leighton
fcbde454f6 Don't do remove_possible_method when delegate is used. Two reasons: 1) warnings should be shown, and fixed at the source and 2) the code is slow. Fixes #1937. 2011-07-18 00:22:26 +01:00
Richard Hulse
27b1bf3c1f [asset pipeline] update capistrano task code
This code actually works.
2011-07-18 11:02:46 +12:00
Prem Sichanugrist
1ccca1b9cb Refactor the code a bit to reduce the duplication 2011-07-17 18:53:15 -04:00
Prem Sichanugrist
6e6994994d Raise an ArgumentError if user passing less number of argument in the dynamic finder
The previous behavior was unintentional, and some people was relying on it. Now the dynamic finder will always expecting the number of arguments to be equal or greater (so you can still pass the options to it.)

So if you were doing this and expecting the second argument to be nil:

    User.find_by_username_and_group("sikachu")

You'll now get `ArgumentError: wrong number of arguments (1 for 2).` You'll then have to do this:

    User.find_by_username_and_group("sikachu", nil)
2011-07-17 18:44:03 -04:00
Ray Baxter
98df4983b3 Add seach, tel, url and email inputs as 'Other Helpers of Interest' 2011-07-17 13:22:15 -07:00
Ray Baxter
82569b3827 examples for telephone_field, url_field and email_field 2011-07-17 13:10:17 -07:00
Ray Baxter
65b19c3633 document options to search_field 2011-07-17 13:08:02 -07:00
Arun Agrawal
d4f4626940 Checking with to_s. As regexp fail with 1.8.7 2011-07-18 01:27:38 +05:30
Santiago Pastorino
e9bd83402e Merge pull request #2046 from sikachu/master-test_fix
Fix a wrong assertion on url_helper_test, and add missing `#html_safe?` a
2011-07-17 12:48:49 -07:00
Prem Sichanugrist
edfb81d668 Fix a wrong assertion on url_helper_test, and refactor html_safe test to be in its method 2011-07-17 15:34:01 -04:00
Santiago Pastorino
7669c33c74 Merge pull request #2018 from bhus/render_partial_invalid_check
Render partial invalid check
2011-07-17 12:28:03 -07:00
Jon Leighton
ac97e25235 Revert "Fix failure in test_preserves_existing_fixture_data from test/cases/fixtures_test.rb when UTC and local time occur on different dates." I am pretty sure this was an incorrect fix, and it still failed in certain circumstances anyway. I am now unable to reproduce the original failure I was experiencing so will leave it for now and see if this pops up again.
This reverts commit e4479b2f1bc54edf155408d51dd3236955150ce1.
2011-07-17 19:55:05 +01:00
John Firebaugh
4860143ee4 ActiveModel support for the :include serialization option
This commit moves support for the :include serialization option for
serializing associated objects out of ActiveRecord in into ActiveModel.
The following methods support the :include option:

  * serializable_hash
  * to_json
  * to_xml

Instances must respond to methods named by the values of the :includes
array (or keys of the :includes hash). If an association method returns
an object that is_a?(Enumerable) (which AR has_many associations do), it
is assumed to be a collection association, and its elements must respond
to :serializable_hash. Otherwise it must respond to :serializable_hash
itself.

While here, fix #858, XmlSerializer should not singularize already
singular association names.
2011-07-17 11:34:07 -07:00
John Firebaugh
1723a7a6c6 Move to_xml tests to xml_serialization_test.rb
One duplicate was eliminated: test_to_xml_including_methods/
test_methods_are_called_on_object.
2011-07-17 11:34:07 -07:00
John Firebaugh
0933b6d1ba We already have the record; no need to retrieve it again 2011-07-17 11:34:06 -07:00
John Firebaugh
cbf924ef08 Replace map+compact with select 2011-07-17 11:34:06 -07:00
John Firebaugh
2a9a10f5e3 Add a test 2011-07-17 11:34:06 -07:00
John Firebaugh
da4e1faf6f serializable_hash(:only => [], :methods => [:foo]) should work 2011-07-17 11:34:06 -07:00
Santiago Pastorino
2f00854d22 Merge pull request #2118 from arunagw/fix_plugin_gen_test
As we are adding db folder in it. Required in test also.
2011-07-17 10:04:53 -07:00
Ray Baxter
a4a309f2bc Merge branch 'master' of github.com:lifo/docrails 2011-07-17 09:31:23 -07:00
Ray Baxter
a92780e72a use correct in description 2011-07-17 09:07:18 -07:00
Josh Kalderimis
e6f0c24bc3 This fixes an issue when bundling to a local path (eg. /vendor/bundle).
If you bundle to a local path bundler is not included in it, so
calling "gem 'bundler'" will fail.
2011-07-17 15:21:19 +02:00
Arun Agrawal
24d67cc9df As we are adding db folder in it. Required in test also. 2011-07-17 18:39:33 +05:30
Richard Hulse
5187264e19 [asset pipeline] Correct CSS section and include Gem details
Also added note about compress option, which was 
not mentioned anywhere and is required
2011-07-17 20:22:25 +12:00
Richard Hulse
602bac19e7 [configuring] add doc for missing assets attribute
.compress turns on the compression using the types
specified in other config options
2011-07-17 20:22:25 +12:00
Ray Baxter
10c2132cbd we're talking about days here, not hours 2011-07-17 00:31:28 -07:00
Ray Baxter
5c71a4e768 wording between select_second, select_minute and
select_hour should be consistent and correct
2011-07-17 00:31:09 -07:00
Ray Baxter
f0a58dbd9b fix typo 2011-07-17 00:24:31 -07:00