1. 22 8月, 2015 12 次提交
    • A
      stop directly accessing `@env` in mime_negotiation · 7bd34c10
      Aaron Patterson 提交于
      we want to go through methods to access `env` because in the future that
      ivar may not be available, or may be calculated lazily
      7bd34c10
    • A
      use public API to fetch the parameter filter · 992bf079
      Aaron Patterson 提交于
      now the parameter filter doesn't need to know about the env hash in
      these two methds.
      992bf079
    • A
      use methods on the request object to implement `fetch` · bce4ff70
      Aaron Patterson 提交于
      Now the Headers internals don't depend on the env hash.
      bce4ff70
    • A
      dup the env hash on Header#env · c0c72684
      Aaron Patterson 提交于
      This prevents external mutations from impacting the internals of the
      request or the Header object.
      c0c72684
    • A
      use accessors on the request object for manipulating env · fbf6b98c
      Aaron Patterson 提交于
      this reduces the API footprint for the env hash so that we can be more
      flexible when changing API in the future
      fbf6b98c
    • A
      use `set_header` rather than []= · ba2173a1
      Aaron Patterson 提交于
      This allows us to avoid calling `env_name` twice.
      ba2173a1
    • A
      dup the request and mutate its headers object. · 1fbf5ad7
      Aaron Patterson 提交于
      duping the request will dup it's underlying env hash.
      1fbf5ad7
    • S
      JSON is still an adapter specific type. · ffc4710c
      Sean Griffin 提交于
      Several changes were made in #21110 which I am strongly opposed to.
      (this is what I get for going on vacation. :trollface:) No type should
      be introduced into the generic `ActiveRecord::Type` namespace, and
      *certainly* should not be registered into the registry unconstrained
      unless it is supported by *all* adapters (which basically means that it
      was specified in the ANSI SQL standard).
      
      I do not think `# :nodoc:` ing the type is sufficient, as it still makes
      the code of Rails itself very unclear as to what the role of that class
      is. While I would argue that this shouldn't even be a super class, and
      that MySql and PG's JSON types are only superficially duplicated (they
      might look the same but will change for different reasons in the
      future).
      
      However, I don't feel strongly enough about it as a point of contention
      (and the biggest cost of harming the blameability has already occured),
      so I simply moved the superclass into a namespace where its role is
      absolutely clear.
      
      After this change, `attribute :foo, :json` will once again work with
      MySQL and PG, but not with Sqlite3 or any third party adapters.
      
      Unresolved questions
      --------------------
      
      The types that and adapter publishes (at least those are unique to that
      adapter, and not adding additional behavior like `MysqlString` should
      probably be part of the adapter's public API. Should we standardize the
      namespace for these, and document them?
      ffc4710c
    • G
      Move the CoC text to the Rails website · 90bcb6de
      Godfrey Chan 提交于
      90bcb6de
    • E
      Remove unnecessary caching · ec9c6d58
      eileencodes 提交于
      `ActiveSupport::Dependencies.constantize(const_name)` calls
      `Reference.new` which is defined as
      `ActiveSupport::Dependencies.constantize(const_name)` meaning this call
      is already cached and we're doing caching that isn't necessary.
      ec9c6d58
    • A
      pass a request object to the headers object · 34fa6658
      Aaron Patterson 提交于
      34fa6658
    • A
      move header allocation to a helper method · c6cfcc61
      Aaron Patterson 提交于
      I'm going to change the constructor, so it's easier to do it in one
      place.
      c6cfcc61
  2. 21 8月, 2015 13 次提交
  3. 20 8月, 2015 11 次提交
  4. 19 8月, 2015 4 次提交