Commit Graph

22564 Commits

Author SHA1 Message Date
Jon Leighton
2033ff825b Merge pull request #560 from guilleiguaran/fix_pluralize_table_names_false
Fixing has_many when ActiveRecord::Base.pluralize_table_names is false
2011-05-16 15:40:12 -07:00
Xavier Noria
bf5e4b4c1f configuratin guide: finished a pass to the "Rails General Configuration" section 2011-05-16 23:55:19 +02:00
José Valim
6733721520 Deprecate attr_accessor_with_default. 2011-05-16 11:31:34 -04:00
José Valim
40fa51123d Merge pull request #1087 from amatsuda/generate_number_field_tag
generate HTML5 number_field tag for integer fields
2011-05-16 07:54:02 -07:00
Akira Matsuda
4d1752bfb2 generate HTML5 number_field tag for integer fields 2011-05-16 23:45:39 +09:00
José Valim
12a4376ae9 Merge pull request #1085 from amatsuda/amo_validator_initializer_cleanup
cleanups on AMo validator initializers
2011-05-16 04:23:44 -07:00
Akira Matsuda
35c5ccb30c Remove unneeded merge with default false options 2011-05-16 15:37:44 +09:00
Akira Matsuda
cbe1d2488b Don't add DEFAULT_TOKENIZER to every instance of LengthValidator. Just use it only when needed. 2011-05-16 15:37:44 +09:00
José Valim
8b0262f953 Merge pull request #573 from smartinez87/attr
Add doc to #attribute_names
2011-05-15 19:48:03 -07:00
Sebastian Martinez
2470392e89 Add doc to #attribute_names 2011-05-15 21:33:49 -03:00
José Valim
d043d65396 Merge pull request #570 from sikachu/decouple_actionpack
Make ParamsWrapper use a well-defined API and not rely on AR methods
2011-05-15 16:13:29 -07:00
Prem Sichanugrist
d77b306b63 Make ParamsWrapper calling newly introduced Model.attribute_names instead of .column_names 2011-05-15 19:07:44 -04:00
Prem Sichanugrist
5ca67eca21 Add ActiveRecord::attribute_names to retrieve a list of attribute names. This method will also return an empty array on an abstract class or a model that the table doesn't exists. 2011-05-15 19:07:40 -04:00
José Valim
6e581cce1c Merge pull request #568 from carlosantoniodasilva/fields_for_fixes
Fields for fixes for non nested attributes and without object
2011-05-15 15:51:20 -07:00
Xavier Noria
dde82a44d7 Merge branch 'master' of git://github.com/lifo/docrails 2011-05-15 22:23:40 +02:00
Xavier Noria
3448288228 reviewed the first ~70 lines of the configuration guide 2011-05-15 22:22:31 +02:00
Pirogov Evgenij
6bd99ecb62 Use more English language 2011-05-15 10:25:33 -07:00
Guillermo Iguaran
6a408f3e90 Fixing Changelog link 2011-05-15 08:19:36 -07:00
Guillermo Iguaran
ecbde46e57 Fixing has_many association when ActiveRecord::Base.pluralize_table_names is false. fixes #557 2011-05-15 03:53:10 -05:00
Aaron Patterson
5d24c3c8c5 Merge pull request #564 from sikachu/fix_wrapper
Do not try to call `column_names` on the abstract class.
2011-05-14 21:52:31 -07:00
Prem Sichanugrist
3bed43c6a5 Do not try to call column_names on the abstract class.
Normally the table for abstract class won't be existed, so we should not trying to call `#column_names` on it.
2011-05-15 00:41:20 -04:00
Carlos Antonio da Silva
82f33dce9c Use record_name to make fields for methods more consistent 2011-05-14 22:18:36 -03:00
Carlos Antonio da Silva
f0479cbbd5 Refactor fields_for to make the api more clear, and fix usage with non nested attributes and without object 2011-05-14 22:09:12 -03:00
Pirogov Evgenij
4b10585128 Clean up redundant backslashes 2011-05-14 15:40:32 -07:00
Carlos Antonio da Silva
6871cda693 Cleanup instantiate builder method definition 2011-05-14 17:23:34 -03:00
Jon Leighton
7e6145b4a2 These extra array operations appear to be unnecessary. Reasoning:
* It is not necessary to subtract 'id' from the list of copied attributes because record and mem_record are equal, so therefore their id attributes are also equal (so there is no harm in copying it, and this reduces the complexity of the code)
 * It is not necessary to intersect the attribute names, since record and mem_record are equal, so they have the same id and class, so they have the same columns in the database. If record has non-column attributes then it seems reasonable to also copy them onto mem_record (though I am not sure what situation this would ever happen in)
2011-05-14 19:49:22 +01:00
Jon Leighton
60b23ea1da CollectionAssociation#merge_target_lists should write to the underlying attributes when copying, rather than using the assignment method 2011-05-14 19:49:22 +01:00
Jon Leighton
6660beef36 An attempt to make CollectionAssociation#merge_target_lists make more sense. 2011-05-14 19:49:22 +01:00
José Valim
e7e1d83ddf Added some docs to controller runtime. 2011-05-14 03:59:14 -07:00
José Valim
c4837f6ce3 Merge pull request #554 from tomafro/reset-activerecord-runtime-before-each-request
ActiveRecord::LogSubscriber.runtime should be reset at the start of each request
2011-05-14 03:57:24 -07:00
Tom Ward
6d96124284 Reset ActiveRecord::LogSubscriber runtime at the start of each request
Previously the runtime was reset implicitly when #cleanup_view_runtime was called at the end of most requests. However, this doesn't happen when the request redirects, or send_file is called.  Consequently, the ActiveRecord runtime recorded in the logs included the time taken for both the current request and the previous redirect.  Explicitly resetting at the start of each request ensures that this can't happen, no matter what occurs previously.
2011-05-14 10:39:01 +01:00
Tom Ward
518ffcd168 Escape regex in controller_runtime_test to actually check that the ActiveRecord message appears 2011-05-14 10:39:01 +01:00
Xavier Noria
d491130236 Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
	actionpack/lib/action_view/helpers/date_helper.rb
	railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
2011-05-14 11:21:27 +02:00
Xavier Noria
e5524d538c minor edits after going through what's new in docrails 2011-05-14 11:15:43 +02:00
Piotr Sarnacki
db886c817c Merge pull request #553 from arunagw/namespaced_generators
Fixed failing tests for namespaced_generators_test. in 1.9.2
2011-05-14 01:54:16 -07:00
Arun Agrawal
546db693fb Fixed failing tests for namespaced_generators_test. in 1.9.2 2011-05-14 14:06:06 +05:30
Karel Minarik
47003f8cdf [GUIDES] Changed the LANGUAGE variable to GUIDES_LANGUAGE to minimize conflicts with regular environment variables (eg. in Ubuntu) 2011-05-14 09:03:30 +02:00
Aaron Patterson
1fac9c74ab securerandom ships with 1.8.7+, so just use it 2011-05-13 23:22:13 -07:00
Xavier Noria
cbe6e09f6a asking the user whether he is "offline" rather than "online" seems more natural as reaction to a potential missing network connection 2011-05-14 03:31:08 +02:00
Xavier Noria
959b7b0fea removes now unused method Rails::Generators::AppBase#dev_or_edge? 2011-05-14 02:49:20 +02:00
Xavier Noria
26cfd1f283 application and plugin generation run bundle install unless --skip-gemfile or --skip-bundle 2011-05-14 02:37:41 +02:00
José Valim
345beb8485 Merge pull request #550 from jasondew/patch-1
typo
2011-05-13 17:19:30 -07:00
Jason Dew
6b07d7f9da typo 2011-05-13 17:15:29 -07:00
Jon Leighton
8a1de9b252 Instead of doing find(:all) which does scoped.find(:all) which does scoped.all, just do scoped.all. 2011-05-13 23:53:02 +01:00
Jon Leighton
5d4799d593 Remove pointless rescue (it doesn't happen anywhere in the tests, and I can't see a way that it would happen ever) 2011-05-13 23:53:02 +01:00
José Valim
0307fc70ad Merge pull request #540 from sikachu/mailer_generator_1_9_style
Update Mailer generator to use 1.9 styled hash when run on Ruby 1.9
2011-05-13 15:29:36 -07:00
Prem Sichanugrist
f2769ebd7e Update Mailer generator to use 1.9 styled hash when run on Ruby 1.9
As always, you can run `--old-style-hash` to override that.
2011-05-13 18:25:32 -04:00
José Valim
a4a338167e Merge pull request #542 from guilleiguaran/1_9_hash_style
Use new hash syntax in wrap_parameters initializer under Ruby 1.9
2011-05-13 15:01:07 -07:00
José Valim
308ea60faf Merge pull request #547 from vatrai/patch-1
rack_mount upgrade to new version 0.8.0
2011-05-13 14:51:46 -07:00
Xavier Noria
c55d7ab9cb move bundler loading down to #bundle_command 2011-05-13 22:22:26 +02:00