1. 22 9月, 2018 6 次提交
    • M
      Index option added for change_table migrations · 5e4c22df
      Mehmet Emin INAC 提交于
      In case if we want to add a column into the existing table
      with index on it, we have to add column and index in two
      seperate lines.
      With this feature we don't need to write an extra line to
      add index for column. We can just use `index` option.
      
      Old behaviour in action:
      ```
        change_table(:languages) do |t|
          t.string :country_code
          t.index: :country_code
        end
      ```
      
      New behaviour in action:
      ```
        change_table(:languages) do |t|
          t.string :country_code, index: true
        end
      ```
      
      Exactly same behaviour is already exist for `create_table` migrations.
      5e4c22df
    • R
      Make sure this test check the issue solved in #31135 · d3b95218
      Rafael Mendonça França 提交于
      Before this change this test was passing even if we revert #31135. The
      reason for that is that `app 'development'` will load the environment in
      the test process and it is happening before db_create_and_drop is
      called.
      
      This was not asserting that the environment was loaded in the db:create
      task itself.
      
      To test it we enhance the db:create task with a block that writes to a
      tmp file the value of the config. If the environment is loaded before
      that task enhancement runs the content of the file will have "true"
      insteand of "false".
      d3b95218
    • Y
      b18f2fe9
    • R
      Merge pull request #33564 from avit/escape_javascript_casting · 013749ec
      Rafael França 提交于
      Let escape_javascript handle conversion to string
      013749ec
    • R
      No private def in the codebase · 6fd92982
      Rafael Mendonça França 提交于
      6fd92982
    • A
      Let escape_javascript handle conversion to string · dd0cfb03
      Andrew Vit 提交于
      This brings `escape_javascript` in line with the behavior of `json_escape` and
      allows other value types to be output without needing explicit casting in the
      view template.
      
      Example:
      
          <%= javascript_tag do %>
            var locale = '<%== j I18n.locale %>'; // locale is a symbol
          <% end %>
      dd0cfb03
  2. 21 9月, 2018 19 次提交
  3. 20 9月, 2018 15 次提交