1. 08 2月, 2015 8 次提交
    • R
      Missing `@` [ci skip] · 2abde960
      Ryuta Kamizono 提交于
      2abde960
    • S
      rm `Type#number?` · 1492e83e
      Sean Griffin 提交于
      This predicate is only used in `query_attribute`, and is relatively easy
      to remove without adding a bunch of is a checks.
      1492e83e
    • S
      rm `Type#text?` · 16629c09
      Sean Griffin 提交于
      This predicate was only to figure out if it's safe to do case
      insensitive comparison, which is only a problem on PG. Turns out, PG can
      just tell us whether we are able to do it or not. If the query turns out
      to be a problem, let's just replace that method with checking the SQL
      type for `text` or `character`. I'd rather not burden the type objects
      with adapter specific knowledge.
      
      The *real* solution, is to deprecate this behavior entirely. The only
      reason we need it is because the `:case_sensitive` option for
      `validates_uniqueness_of` is documented as "this option is ignored for
      non-strings". It makes no sense for us to do that. If the type can't be
      compared in a case insensitive way, the user shouldn't tell us to do
      case insensitive comparison.
      16629c09
    • S
      Move non-type objects into the `Type::Helpers` namespace · c4ef73af
      Sean Griffin 提交于
      The type code is actually quite accessible, and I'm planning to
      encourage people to look at the files in the `type` folder to learn more
      about how it works. This will help reduce the noise from code that is
      less about type casting, and more about random AR nonsense.
      c4ef73af
    • S
      rm `ActiveRecord::Type::Decorator` · 7e93e33c
      Sean Griffin 提交于
      It only existed to make sure the subclasses of `Delegator` were YAML
      serializable. As of Ruby 2.2, these are YAML dumpable by default, as it
      includes
      https://github.com/tenderlove/psych/commit/2a4d9568f7d5d19c00231cf48eb855cc45ec3394
      7e93e33c
    • S
      Push multi-parameter assignement into the types · 631707a5
      Sean Griffin 提交于
      This allows us to remove `Type::Value#klass`, as it was only used for
      multi-parameter assignment to reach into the types internals. The
      relevant type objects now accept a hash in addition to their previous
      accepted arguments to `type_cast_from_user`. This required minor
      modifications to the tests, since previously they were relying on the
      fact that mulit-parameter assignement was reaching into the internals of
      time zone aware attributes. In reaility, changing those properties at
      runtime wouldn't change the accessor methods for all other forms of
      assignment.
      631707a5
    • R
      Merge pull request #18842 from yuki24/simplify-NameError#missing_name · bdeeca84
      Rafael Mendonça França 提交于
      NameError#missing_name? can just use NameError#name if the arg is a Symbol
      bdeeca84
    • R
      Merge pull request #18574 from aditya-kapoor/silent-actionmailer-tests · 70693f08
      Rafael Mendonça França 提交于
      remove noise from AM tests
      70693f08
  2. 07 2月, 2015 32 次提交