Commit Graph

26158 Commits

Author SHA1 Message Date
Aaron Patterson 9b46613780 Merge pull request #3521 from nulogy/fix_postgres_adapter_to_handle_spaces_between_schemas
Fix postgres adapter to handle spaces between schemas
2011-11-06 13:16:07 -03:00
José Valim 6950639998 Merge pull request #3536 from pkumar/master
Make pluralize follow singularize's logic of uncountability check
2011-11-06 05:59:31 -08:00
Pavan Kumar Sunkara 1934b77406 Added the test case for #3537 2011-11-06 19:22:46 +05:30
Dalibor Nasevic 759906d512 Fixed stale doc in AbstractController::Layouts 2011-11-06 14:43:11 +01:00
Vijay Dev 8750c9a1cf fix markups for plus in AR guide 2011-11-06 18:59:29 +05:30
Vijay Dev 17947cebc0 Merge branch 'master' of github.com:lifo/docrails 2011-11-06 17:27:44 +05:30
Jon Leighton 8a2f0a9623 RUBY_ENGINE is not defined on 1.8 2011-11-06 10:54:59 +00:00
Jon Leighton fc988115f7 Implement a workaround for a bug in ruby-1.9.3p0.
The bug is that an error would be raised while attempting to convert a
template from one encoding to another.

Please see http://redmine.ruby-lang.org/issues/5564 for more details.

The workaround is to load all conversions into memory ahead of time,
and will only happen if the ruby version is *exactly* 1.9.3p0. The
hope is obviously that the underlying problem will be resolved in
the next patchlevel release of 1.9.3.
2011-11-06 10:40:00 +00:00
Jon Leighton 7776055e2d Revert "Skip test_default_external_works on the CI for Ruby 1.9.3."
This reverts commit 10773f94ea.
2011-11-06 10:39:59 +00:00
José Valim a02bb72cf7 Merge pull request #3537 from dvyjones/refactor-pluralize-singularize
Refactored pluralize and singularize into a common method
2011-11-06 02:20:06 -08:00
Henrik Hodne 52fa34faee Refactored pluralize and singularize into a common method.
See diff discussion on rails/#3536.
2011-11-06 11:13:51 +01:00
Jon Leighton 62512b9fb9 Merge pull request #3535 from jmazzi/master
Update ActiveRecord#attribute_present? to work as documented
2011-11-06 01:27:29 -08:00
Alexey Vakhov 949b3e743f Docs cosmetic fixes in Action View form_helper.rb 2011-11-06 11:46:28 +04:00
Justin Mazzi c7d2078596 Update ActiveRecord#attribute_present? to work as documented
"Returns true if the specified attribute has been set by the user or by
a database load and is neither nil nor empty?"

Fixes #1613
2011-11-05 22:36:19 -04:00
Xavier Noria e7b7b44123 implements AR::Relation#explain
This is a first implementation, EXPLAIN is highly
dependent on the database and I have made some
compromises.

On one hand, the method allows you to run the most
common EXPLAIN and that's it. If you want EXPLAIN
ANALYZE in PostgreSQL you need to do it by hand.

On the other hand, I've tried to construct a string
as close as possible to the ones built by the
respective shells. The rationale is that IMO the
user should feel at home with the output and
recognize it at first sight. Per database.

I don't know whether this implementation is going
to work well. Let's see whether people like it.
2011-11-05 18:30:19 -07:00
Xavier Noria 89d7372dac Merge pull request #3534 from guilleiguaran/arel-git-gemfile
Add arel to Gemfile on apps generated in edge Rails
2011-11-05 17:28:52 -07:00
Guillermo Iguaran 44e751fdd4 Add arel to Gemfile on apps generated in edge Rails 2011-11-05 19:26:23 -05:00
Xavier Noria 4d9f779b54 bumps up sprockets 2011-11-05 15:33:36 -07:00
Xavier Noria 56f16e25e9 fixes typo 2011-11-05 12:09:18 -07:00
Xavier Noria d287e90870 implements AS::Notifications.subscribed, which provides subscriptions to events while a block runs 2011-11-05 12:02:54 -07:00
Xavier Noria b33232f1b2 expands the documentation of AS::Notifications 2011-11-05 10:29:41 -07:00
Jon Leighton f575e21025 Merge pull request #3525 from kennyj/fix_3440-1
Fixed an issue id false option is ignored on mysql/mysql2 (fix #3440)
2011-11-05 10:29:18 -07:00
Jon Leighton f140445b1d Revert "Merge pull request #2378 from cesario/remove_warnings_activemodel"
This reverts commit 6aaae3de27, reversing
changes made to fdbc4e5f4e.

Reason: build failure.
2011-11-05 17:21:58 +00:00
kennyj fb0bf3c984 Fixed an issue id false option is ignored on mysql/mysql2 (fix #3440) 2011-11-06 02:15:47 +09:00
Vijay Dev 55621504b0 make class name consistent with the filename 2011-11-05 22:31:39 +05:30
Jon Leighton 10773f94ea Skip test_default_external_works on the CI for Ruby 1.9.3.
This test is affected by a bug in Ruby 1.9.3p0 and trunk:
http://redmine.ruby-lang.org/issues/5564

Given we cannot fix it for ourselves, it is better to skip for now so
that we will easily see if further failures are introduced.

Jon Leighton is monitoring the bug report and will revert this when a
suitable solution is found (either a new Ruby release or a generic
workaround).

If you are using 1.9.3 in your app and have templates that are not in
UTF-8, you should add a workaround early on in the boot process. For
example, if your templates are Shift_JIS encoded, then add the
following in an initializer:

Encoding::Converter.new('Shift_JIS', 'UTF-8')
2011-11-05 16:42:53 +00:00
Jon Leighton 9a111c7cf9 Use uniq instead of manually putting a DISTINCT in the query 2011-11-05 16:22:18 +00:00
Jon Leighton 562583c766 Add ActiveRecord::Relation#uniq for toggling DISTINCT in the SQL query 2011-11-05 16:22:18 +00:00
Vijay Dev 6aaae3de27 Merge pull request #2378 from cesario/remove_warnings_activemodel
Remove warnings by calling remove_method
2011-11-05 08:44:16 -07:00
Vijay Dev fdbc4e5f4e Merge branch 'master' of github.com:lifo/docrails 2011-11-05 20:45:11 +05:30
Vijay Dev 09298e4257 Revert "outline two ways to invoke a custom active model validator"
This reverts commit d163d3bf7e.

Reason: The alternate approach can be documented in the guide and
not disrupt the existing flow in the readme.
2011-11-05 20:43:04 +05:30
Vijay Dev 53f61acdca Revert "make the inline text a comment in the code block"
This reverts commit 36a5f48f93.

Reason: Editing .gitignore in docrails is not allowed. Docrails is meant
only for documentation.
2011-11-05 20:38:07 +05:30
Jon Leighton 2751e213d8 Merge pull request #3529 from vjebelev/ar_ordered_indexes2
AR changes to support creating ordered (asc, desc) indexes
2011-11-05 08:03:19 -07:00
Florian Walch bcd25e7576 Fixed after_initialize/after_find guide
Defining after_initialize and after_find as ordinary methods like documented
in the guide doesn't work with Rails 3.1.1; now macro-style is used here, too.
2011-11-05 13:34:01 +01:00
Alex Tambellini 15fb4302b6 schema_format :sql should behave like schema_format :ruby
This commit adds a db:structure:load task that is run instead of
db:schema:load when schema_format is set to :sql. This patch also removes
the prefixing of the structure.sql files to mimic the use of a single
schema.rb file. The patch originates from github issue #715.
2011-11-04 17:34:08 -04:00
Vlad Jebelev 69dcd45aea AR changes to support creating ordered (asc, desc) indexes 2011-11-04 15:45:24 -05:00
Vijay Dev cb06727b6c add tests for the case where size is explicitly passed to number_field helper 2011-11-04 22:32:40 +05:30
Jon Leighton 76dedf0232 Merge pull request #3517 from arunagw/test_fix_activerecord
Fix test as one more has_many added
2011-11-04 07:04:43 -07:00
Arun Agrawal 6da558660c Fix test as one more has_many added 2011-11-04 19:30:59 +05:30
Jon Leighton 0fcf8bfbe9 Merge pull request #3516 from cesario/fix_gemspec
Synchronize the gemspecs since CHANGELOG has been renamed to CHANGELOG.md
2011-11-04 06:54:32 -07:00
Franck Verrot 1679aa56f3 Synchronize the gemspecs since CHANGELOG has been renamed to CHANGELOG.md 2011-11-04 14:46:39 +01:00
Jon Leighton 281272ad36 Convert CHANGELOGs to Markdown format.
Reasons:

 * Markdown reads well as plain text, but can also be formatted.
 * It will make it easier for people to read on the web as Github
   formats the Markdown nicely.
 * It will encourage a level of consistency when people are writing
   CHANGELOG entries.

The script used to perform the conversion is at
https://gist.github.com/1339263
2011-11-04 12:55:17 +00:00
Jon Leighton e6cc2ea201 Allow the :class_name option for associations to take a symbol.
This is to avoid confusing newbies, and to be consistent with the fact
that other options like :foreign_key already allow a symbol or a string.
2011-11-04 11:17:56 +00:00
José Valim 2c67845271 Merge pull request #3514 from waseem/remove_size_attribute_from_number_field
Remove 'size' attribute from number_field form helper fixes #3454
2011-11-04 03:31:39 -07:00
Aaron Patterson 0e407a9041 Merge pull request #1163 from amatsuda/sexier_migration_31
Sexier migrations
2011-11-04 03:29:59 -07:00
Karthik Muthupalaniappan 36a5f48f93 make the inline text a comment in the code block 2011-11-04 15:22:50 +05:30
Karthik Muthupalaniappan d163d3bf7e outline two ways to invoke a custom active model validator 2011-11-04 15:18:37 +05:30
Waseem Ahmad 56207a3f01 Remove 'size' attribute from number_field form helper fixes #3454
f.number_field generates <input type="number", size="30"../> which is
invalid HTML5. See: http://dev.w3.org/html5/spec/Overview.html#number-state
2011-11-04 15:03:02 +05:30
Jeremy Kemper 533a9f84b0 Merge pull request #3507 from jmazzi/issue-3503
Preserve SELECT columns on the COUNT for finder_sql when possible
2011-11-03 21:17:15 -07:00
Henrik Hodne 8611f14caf Added bundle exec to rake test.
This is in response to rails/rails#3504.
2011-11-03 22:19:49 +01:00