Commit Graph

32741 Commits

Author SHA1 Message Date
Prem Sichanugrist db8460ca0f Update Active Record CHANGELOG for #7419 2012-09-06 16:19:47 -04:00
Aditya Sanghi d016decb47 Dynamic Delivery Method Options 2012-09-07 01:47:27 +05:30
Aditya Sanghi 75dc1950e0 fix bad changelog example 2012-09-07 01:39:27 +05:30
José Valim 75bde02321 Merge pull request #7419 from releu/fix-invalid-filename-migration-generator
Ensure valid migration filename on generating migration
2012-09-06 13:03:09 -07:00
Jan Bernacki d965bbfe9f add mini-validator on creating migration
move validation to AR
2012-09-06 23:34:10 +04:00
Yves Senn 319482d8fe postgres, map scaled intervals to string datatype (#7518) 2012-09-06 18:01:34 +02:00
Semyon Perepelitsa 150c6dc30f Redirect block with arity of 1 is deprecated. 2012-09-06 23:23:05 +08:00
José Valim e8c9f0513d Merge pull request #7542 from aaronrenner/patch-2
Fixed around callback with lambda example
2012-09-06 07:26:39 -07:00
Aaron Renner b883595e55 Fixed non-working around callback example 2012-09-06 08:25:58 -06:00
Aaron Renner 8b0d5bfc77 Fixed around callback with lambda example
This is a follow up to issue #7535
2012-09-06 08:21:47 -06:00
Xavier Noria 2ed325a3e9 we already have the module objects, do not constantize
I have also chosen a variable name that matches the
parameter in the definition of load_missing_constant.
2012-09-06 14:11:04 +02:00
Xavier Noria 021cb85b95 restores awesome comment
Those who say source code should be without comments lie.
2012-09-06 13:43:49 +02:00
Xavier Noria 3ee191fd95 no more const_missing combinatorics
Basically, const_missing had a loop to try parent namespaces
if the constant lookup failed, but at the same time delegated
to load_missing_constant which in turn also walks up parent
namespaces calling const_missing by hand. In the case of missing
constants this results in repeated work in some funky nested way.
2012-09-06 13:39:23 +02:00
José Valim 3c27dcc639 Merge pull request #7397 from asanghi/master
Allow delivery method options to be set per mail instance
2012-09-06 03:36:19 -07:00
Rafael Mendonça França 4fa2f10494 Put the create_table block in a transaction.
This will solve the issue that abort the connection transaction when we
skip the tests.
2012-09-05 23:53:10 -03:00
Rafael Mendonça França a690935804 Merge pull request #7527 from guedes/pg9.2_json_support
AR supporting new JSON data type on PostgreSQL >= 9.2
2012-09-05 18:58:05 -07:00
Dickson S. Guedes 3b516b5beb ActiveRecord support to PostgreSQL 9.2 JSON type
This implements the support to encode/decode JSON
data to/from database and creating columns of type
JSON using a native type [1] supported by PostgreSQL
from version 9.2.

[1] http://www.postgresql.org/docs/9.2/static/datatype-json.html
2012-09-05 22:39:43 -03:00
schneems c9d1ba41fd Doc: sweepers only work on Active Record Models
In response to this rails issue: https://github.com/rails/rails/issues/3729
2012-09-05 15:52:24 -07:00
Rafael Mendonça França ddaeaefc2a Add CHANGELOG entry for #7532 [ci skip] 2012-09-05 19:38:54 -03:00
Rafael Mendonça França 2197d61c69 Merge pull request #7532 from al2o3cr/fix_store_bugs
correct handling of changes in AR::Store, combine multiple store_accessors
2012-09-05 15:33:48 -07:00
Rafael Mendonça França ebc4d8cede Merge pull request #7536 from pivotal/fix_pluck_with_reserved_words
Fix pluck when columns/tables are reserved words.
2012-09-05 15:30:01 -07:00
Ian Lesperance c7d752fe2f Fix pluck when columns/tables are reserved words. 2012-09-05 18:00:07 -04:00
Rafael Mendonça França fdcbc560ab Merge pull request #7525 from seamusabshere/use-mysql-binary-for-rake-db-structure-load
Use the 'mysql' binary for 'rake db:structure:load'
2012-09-05 14:48:19 -07:00
Andreas Loupasakis 2c96638c70 Fix a typo 2012-09-06 00:46:52 +03:00
Rafael Mendonça França 1c8539da47 Define just the cattr_reader.
This will trim down the API and avoid some error that can be made
changing the cache object.
2012-09-05 14:38:16 -03:00
Rafael Mendonça França d8dee214e3 Use the same logger that ActionView::Base for the Digestor 2012-09-05 13:51:24 -03:00
Aldo "xoen" Giambelluca 75857d0f80 Fixed array wrongly translated in footnote in a guide [ci skip]
In the sentence "If <tt>@post.author_ids</tt> is [1], this would ..."
the array [1] is converted in a footnote, fixed this using <notextile>.
2012-09-05 18:37:19 +02:00
Seamus Abshere ece23b5fa0 Use the 'mysql' binary for 'rake db:structure:load'.
The previous implementation had the strange requirement that db/structure.sql contain only CREATE TABLE sql statements, one per table, separated by double newlines. SQLite3 and PostgreSQL database tasks, on the other hand, simply spawn 'sqlite3' and 'psql' binaries to load the file directly. The new implementation follows this and attempts to respect all current MySQL configuration settings.
2012-09-05 11:10:15 -05:00
Matt Jones 20f943ffd8 correctly flag changed attributes in AR::Store, combine multiple calls to store_accessor 2012-09-05 11:01:26 -04:00
Ryan Bigg baa73ac723 Add giant belongs_to 'please don't pluralize me' note
I've personally seen too many newbies get this wrong and pluralize the association
2012-09-05 15:42:43 +01:00
Rafael Mendonça França a227359c62 Remove unneeded requires
We should not require all the core extensions inside the frameworks.
The logger is already defined in the Action View framework.
2012-09-05 11:07:25 -03:00
Rafael Mendonça França 91183baa6d Merge pull request #7337 from adzap/string_to_dummy_time
Fix for time type columns with invalid time value
2012-09-05 06:26:53 -07:00
Rafael Mendonça França 9e0a14f5e2 Merge pull request #7447 from etehtsea/postgresql-adapter
Modularize postgresql adapter
2012-09-05 06:03:09 -07:00
Adam Meehan acf583a5e0 Update changelog with time column type casting fix 2012-09-05 21:05:25 +10:00
Adam Meehan ce7cdb9072 Fix for time type columns with invalid time
The string_to_dummy_time method was blindly parsing the dummy time string
with Date._parse which returns a hash for the date part regardless
of whether the time part is an invalid time string.
2012-09-05 21:05:04 +10:00
Xavier Noria 08c4eb5e24 Merge pull request #7530 from robin850/master
Fix a typo in AD
2012-09-05 02:49:28 -07:00
Robin Dupret dc69220e28 Fix a typo 2012-09-05 12:30:09 +03:00
Konstantin Shabanov 232d2223eb Modularize postgresql adapter 2012-09-05 15:17:45 +07:00
Rafael Mendonça França ac5089d769 Merge pull request #7519 from leocassarani/merge-with-block
Add an optional block to HashWithIndifferentAccess#update and #merge
2012-09-04 17:07:17 -07:00
Leo Cassarani edab820d9e Extend HashWithIndifferentAccess#update to take an optional block
When a block is passed into the method, it will be invoked for each
duplicated key, with the key in question and the two values as
arguments. The value for the duplicated key in the receiver will
be set to the return value of the block.

This behaviour matches Ruby's long-standing implementation of
Hash#update and is intended to provide a more consistent interface.

HashWithIndifferentAccess#merge is also affected by the change, as it
uses #update internally.
2012-09-05 00:59:29 +01:00
Rafael Mendonça França 7995c03dc0 Merge pull request #7522 from lexmag/mime_type
Refactor `Mime::Type`
2012-09-04 15:56:29 -07:00
Aleksey Magusev 69723138ad Refactor `Mime::Type`
`parse` method performance improvements - ~27-33%:

    accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,  , pronto/1.00.00, sslvpn/1.00.00.00, */*"

    Benchmark.measure{ 1_000_0.times { Mime::Type.parse(accept) }}

    old: 1.430000   0.000000   1.430000 (  1.440977)
    new: 0.920000   0.000000   0.920000 (  0.921813)
2012-09-05 02:49:10 +04:00
David Heinemeier Hansson a497bed113 We dont need to include the name and the format in the digest -- source is authoritative enough 2012-09-04 17:29:00 -05:00
Aditya Sanghi 8fc8763fde Allow delivery method options to be set per mail instance 2012-09-04 22:34:41 +05:30
David Heinemeier Hansson 27acd1e0d2 Merge pull request #7422 from ernie/improvements-to-improved-routing
Allow routing concerns to accept a callable
2012-09-04 08:28:24 -07:00
Konstantin Haase 1cb684c2ef update caching guide: stale? can also figure out last_modified on its own 2012-09-04 15:51:06 +02:00
Xavier Noria 5388fee718 revised the exception message "Expected #{file_path} to define #{qualified_name}"
Users need to know the ultimate problem here is that AS was
trying to autoload a constant and it failed.
2012-09-04 01:24:09 +02:00
Guillermo Iguaran db354204b7 Update caching guide: memcache-client was replaced with dalli 2012-09-03 16:52:08 -05:00
Rafael Mendonça França 70f147db7b Merge pull request #7515 from senny/custom_inheritance_column_test_refactoring
custom inheritance_column test refactoring
2012-09-03 12:13:03 -07:00
Yves Senn 9f494a9a34 test cleanup, remove ruby_type because it's no longer needed
All tests with a custom inheritance_column use the `Vegtable` model.
The field ruby_type on the Company models is no longer needed
2012-09-03 20:38:14 +02:00