1. 24 6月, 2014 1 次提交
    • Y
      add missing `:nodoc:` for recent refactorings. [ci skip] · b27e856d
      Yves Senn 提交于
      Adding `# :nodoc:` to the parent `class` / `module` is not going
      to ignore nested classes or modules.
      
      There is a modifier `# :nodoc: all` but sadly the containing class
      or module will continue to be in the docs.
      
      /cc @sgrif
      b27e856d
  2. 14 6月, 2014 1 次提交
  3. 10 6月, 2014 2 次提交
    • S
      Rename `type_cast` to `type_cast_from_database` · d24e6407
      Sean Griffin 提交于
      In some cases there is a difference between the two, we should always
      be doing one or the other. For convenience, `type_cast` is still a
      private method on type, so new types that do not need different behavior
      don't need to implement two methods, but it has been moved to private so
      it cannot be used accidentally.
      d24e6407
    • S
      Make `_before_type_cast` actually be before type cast · c93dbfef
      Sean Griffin 提交于
      - The following is now true for all types, all the time
        - `model.attribute_before_type_cast == given_value`
        - `model.attribute == model.save_and_reload.attribute`
        - `model.attribute == model.dup.attribute`
        - `model.attribute == YAML.load(YAML.dump(model)).attribute`
      - Removes the remaining types implementing `type_cast_for_write`
      - Simplifies the implementation of time zone aware attributes
      - Brings tz aware attributes closer to being implemented as an attribute
        decorator
      - Adds additional point of control for custom types
      c93dbfef
  4. 04 6月, 2014 1 次提交
  5. 28 5月, 2014 1 次提交
    • Y
      pg, keep `hstore` and `json` attributes as `Hash` in @attributes. · bdbf00dc
      Yves Senn 提交于
      The solution presented in this patch is not efficient. We should replace it
      in the near future. The following needs to be worked out:
        * Is `@attributes` storing the Ruby or SQL representation?
        * `cacheable_column?` is broken but `hstore` and `json` rely on that behavior
      
      Refs #15369.
      
      /cc @sgrif @rafaelfranca
      bdbf00dc
  6. 21 5月, 2014 1 次提交
    • S
      Move PG OID types to their own files · 30bf07d1
      Sean Griffin 提交于
      As we promote these classes to first class concepts, these classes are
      starting to gain enough behavior to warrant being moved into their own
      files. Many of them will become quite large as we move additional
      behavior to the type objects.
      30bf07d1