Permalink
Browse files

Convert changelogs to 1.9 hash style and fix some formatting [ci skip]

  • Loading branch information...
1 parent 99d142a commit df9f9b7f3e87b8e83f9cc14cc36e0800c88c3c56 @carlosantoniodasilva carlosantoniodasilva committed Dec 14, 2012
@@ -15,8 +15,8 @@
def my_mailer(user,company)
mail to: user.email, subject: "Welcome!",
- delivery_method_options: {user_name: company.smtp_user,
- password: company.smtp_password}
+ delivery_method_options: { user_name: company.smtp_user,
+ password: company.smtp_password }
end
This will ensure that your default SMTP settings will be overridden
View
@@ -2,7 +2,7 @@
* Clear url helper methods when routes are reloaded. *Andrew White*
-* Fix a bug in ActionDispatch::Request#raw_post that caused env['rack.input']
+* Fix a bug in `ActionDispatch::Request#raw_post` that caused `env['rack.input']`
to be read but not rewound.
*Matt Venables*
@@ -16,8 +16,8 @@
Example:
class PeopleController < ActionController::Base
- before_action :set_person, except: [ :index, :new, :create ]
- before_action :ensure_permission, only: [ :edit, :update ]
+ before_action :set_person, except: [:index, :new, :create]
+ before_action :ensure_permission, only: [:edit, :update]
...
@@ -44,13 +44,13 @@
<%= render project.topics %>
<% end %>
- #and
+ # and
<%= cache_unless condition, project do %>
<b>All the topics on this project</b>
<%= render project.topics %>
<% end %>
-
+
*Stephen Ausman + Fabrizio Regini + Angelo Capilleri*
* Add filter capability to ActionController logs for redirect locations:
@@ -68,7 +68,7 @@
an invalid `:layout` argument.
#8376
- render :partial => 'partial', :layout => true
+ render partial: 'partial', layout: true
# results in ActionView::MissingTemplate: Missing partial /true
@@ -86,11 +86,11 @@
*Drew Ulmer*
-* No sort Hash options in #grouped_options_for_select. *Sergey Kojin*
+* No sort Hash options in `grouped_options_for_select`. *Sergey Kojin*
-* Accept symbols as #send_data :disposition value *Elia Schito*
+* Accept symbols as `send_data :disposition` value *Elia Schito*
-* Add i18n scope to distance_of_time_in_words. *Steve Klabnik*
+* Add i18n scope to `distance_of_time_in_words`. *Steve Klabnik*
* `assert_template`:
- is no more passing with empty string.
@@ -145,16 +145,16 @@
*Joost Baaij*
-* Fix input name when `:multiple => true` and `:index` are set.
+* Fix input name when `multiple: true` and `:index` are set.
Before:
- check_box("post", "comment_ids", { :multiple => true, :index => "foo" }, 1)
+ check_box("post", "comment_ids", { multiple: true, index: "foo" }, 1)
#=> <input name=\"post[foo][comment_ids]\" type=\"hidden\" value=\"0\" /><input id=\"post_foo_comment_ids_1\" name=\"post[foo][comment_ids]\" type=\"checkbox\" value=\"1\" />
After:
- check_box("post", "comment_ids", { :multiple => true, :index => "foo" }, 1)
+ check_box("post", "comment_ids", { multiple: true, index: "foo" }, 1)
#=> <input name=\"post[foo][comment_ids][]\" type=\"hidden\" value=\"0\" /><input id=\"post_foo_comment_ids_1\" name=\"post[foo][comment_ids][]\" type=\"checkbox\" value=\"1\" />
Fix #8108
@@ -326,15 +326,15 @@
New applications are generated with:
- protect_from_forgery :with => :exception
+ protect_from_forgery with: :exception
*Sergey Nartimov*
* Add .ruby template handler, this handler simply allows arbitrary Ruby code as a template. *Guillermo Iguaran*
* Add `separator` option for `ActionView::Helpers::TextHelper#excerpt`:
- excerpt('This is a very beautiful morning', 'very', :separator => ' ', :radius => 1)
+ excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1)
# => ...a very beautiful...
*Guirec Corbel*
@@ -451,7 +451,7 @@
We recommend the use of Unobtrusive JavaScript instead. For example:
- link_to "Greeting", "#", :class => "nav_link"
+ link_to "Greeting", "#", class: "nav_link"
$(function() {
$('.nav_link').click(function() {
@@ -497,7 +497,7 @@
* Remove `ActionDispatch::Head` middleware in favor of `Rack::Head`. *Santiago Pastorino*
-* Deprecate `:confirm` in favor of `:data => { :confirm => "Text" }` option for `button_to`, `button_tag`, `image_submit_tag`, `link_to` and `submit_tag` helpers.
+* Deprecate `:confirm` in favor of `data: { confirm: "Text" }` option for `button_to`, `button_tag`, `image_submit_tag`, `link_to` and `submit_tag` helpers.
*Carlos Galdino + Rafael Mendonça França*
@@ -509,7 +509,7 @@
add_flash_types :error, :warning
end
- If you add the above code, you can use `<%= error %>` in an erb, and `redirect_to /foo, :error => 'message'` in a controller.
+ If you add the above code, you can use `<%= error %>` in an erb, and `redirect_to /foo, error: 'message'` in a controller.
*kennyj*
@@ -592,7 +592,7 @@
* Templates without a handler extension now raises a deprecation warning but still
defaults to ERb. In future releases, it will simply return the template contents. *Steve Klabnik*
-* Deprecate `:disable_with` in favor of `:data => { :disable_with => "Text" }` option from `submit_tag`, `button_tag` and `button_to` helpers.
+* Deprecate `:disable_with` in favor of `data: { disable_with: "Text" }` option from `submit_tag`, `button_tag` and `button_to` helpers.
*Carlos Galdino + Rafael Mendonça França*
@@ -614,7 +614,7 @@
* Add backtrace to development routing error page. *Richard Schneeman*
-* Replace `include_seconds` boolean argument with `:include_seconds => true` option
+* Replace `include_seconds` boolean argument with `include_seconds: true` option
in `distance_of_time_in_words` and `time_ago_in_words` signature. *Dmitriy Kiriyenko*
* Make current object and counter (when it applies) variables accessible when
@@ -638,11 +638,11 @@
* Changed default value for `config.action_view.embed_authenticity_token_in_remote_forms`
to `false`. This change breaks remote forms that need to work also without javascript,
so if you need such behavior, you can either set it to `true` or explicitly pass
- `:authenticity_token => true` in form options
+ `authenticity_token: true` in form options
* Added ActionDispatch::SSL middleware that when included force all the requests to be under HTTPS protocol. *Rafael Mendonça França*
-* Add `include_hidden` option to select tag. With `:include_hidden => false` select with `multiple` attribute doesn't generate hidden input with blank value. *Vasiliy Ermolovich*
+* Add `include_hidden` option to select tag. With `include_hidden: false` select with `multiple` attribute doesn't generate hidden input with blank value. *Vasiliy Ermolovich*
* Removed default `size` option from the `text_field`, `search_field`, `telephone_field`, `url_field`, `email_field` helpers. *Philip Arndt*
@@ -659,7 +659,7 @@
* Don't ignore `force_ssl` in development. This is a change of behavior - use a `:if` condition to recreate the old behavior.
class AccountsController < ApplicationController
- force_ssl :if => :ssl_configured?
+ force_ssl if: :ssl_configured?
def ssl_configured?
!Rails.env.development?
@@ -728,15 +728,15 @@
*Carlos Antonio da Silva + Rafael Mendonça França*
-* check_box with `:form` html5 attribute will now replicate the `:form`
+* `check_box` with `:form` html5 attribute will now replicate the `:form`
attribute to the hidden field as well. *Carlos Antonio da Silva*
* Turn off verbose mode of rack-cache, we still have X-Rack-Cache to
check that info. Closes #5245. *Santiago Pastorino*
-* `label` form helper accepts :for => nil to not generate the attribute. *Carlos Antonio da Silva*
+* `label` form helper accepts `for: nil` to not generate the attribute. *Carlos Antonio da Silva*
-* Add `:format` option to number_to_percentage *Rodrigo Flores*
+* Add `:format` option to `number_to_percentage`. *Rodrigo Flores*
* Add `config.action_view.logger` to configure logger for Action View. *Rafael Mendonça França*
@@ -756,7 +756,7 @@
* Deprecated `ActionController::Routing` in favour of `ActionDispatch::Routing`.
-* `check_box helper` with `:disabled => true` will generate a disabled
+* `check_box helper` with `disabled: true` will generate a disabled
hidden field to conform with the HTML convention where disabled fields are
not submitted with the form. This is a behavior change, previously the hidden
tag had a value of the disabled checkbox. *Tadas Tamosauskas*
View
@@ -19,7 +19,7 @@
*Yves Senn*
-* Use BCrypt's MIN_COST in the test environment for speedier tests when using `has_secure_pasword`.
+* Use BCrypt's `MIN_COST` in the test environment for speedier tests when using `has_secure_pasword`.
*Brian Cardarella + Jeremy Kemper + Trevor Turk*
View
@@ -84,8 +84,8 @@
*Yves Senn*
* Add STI support to init and building associations.
- Allows you to do `BaseClass.new(:type => "SubClass")` as well as
- `parent.children.build(:type => "SubClass")` or `parent.build_child`
+ Allows you to do `BaseClass.new(type: "SubClass")` as well as
+ `parent.children.build(type: "SubClass")` or `parent.build_child`
to initialize an STI subclass. Ensures that the class name is a
valid class and that it is in the ancestors of the super class
that the association is expecting.
@@ -116,7 +116,7 @@
* Fix postgresql adapter to handle BC timestamps correctly
- HistoryEvent.create!(:name => "something", :occured_at => Date.new(0) - 5.years)
+ HistoryEvent.create!(name: "something", occured_at: Date.new(0) - 5.years)
*Bogdan Gusiev*
@@ -747,7 +747,7 @@
*kennyj*
-* Changed validates_presence_of on an association so that children objects
+* Changed `validates_presence_of` on an association so that children objects
do not validate as being present if they are marked for destruction. This
prevents you from saving the parent successfully and thus putting the parent
in an invalid state.
@@ -764,7 +764,7 @@
def change
create_table :foobars do |t|
- t.timestamps :precision => 0
+ t.timestamps precision: 0
end
end
@@ -80,7 +80,7 @@
* Hash#extract! returns only those keys that present in the receiver.
- {:a => 1, :b => 2}.extract!(:a, :x) # => {:a => 1}
+ {a: 1, b: 2}.extract!(:a, :x) # => {:a => 1}
*Mikhail Dieterle*
@@ -158,7 +158,7 @@
You can choose which instance of the deprecator will be used.
- deprecate :method_name, :deprecator => deprecator_instance
+ deprecate :method_name, deprecator: deprecator_instance
You can use ActiveSupport::Deprecation in your gem.
@@ -176,7 +176,7 @@
def new_method
end
- deprecate :old_method => :new_method, :deprecator => deprecator
+ deprecate old_method: :new_method, deprecator: deprecator
end
MyGem.new.old_method
View
@@ -1,10 +1,11 @@
## Rails 4.0.0 (unreleased) ##
-* The public/index.html is no longer generated for new projects. Page is replaced by internal welcome_controller inside of railties
+* The `public/index.html` is no longer generated for new projects.
+ Page is replaced by internal `welcome_controller` inside of railties.
*Richard Schneeman*
-* Add ENV['RACK_ENV'] support to `rails runner/console/server`.
+* Add `ENV['RACK_ENV']` support to `rails runner/console/server`.
*kennyj*
@@ -15,21 +16,21 @@
*Yves Senn*
-* Add sqlserver.yml template file to satisfy '-d sqlserver' being passed to 'rails new'.
+* Add `sqlserver.yml` template file to satisfy `-d sqlserver` being passed to `rails new`.
Fix #6882
- *Robert Nesius*
+ *Robert Nesius*
* Rake test:uncommitted finds git directory in ancestors *Nicolas Despres*
-* Add dummy app Rake tasks when --skip-test-unit and --dummy-path is passed to the plugin generator.
+* Add dummy app Rake tasks when `--skip-test-unit` and `--dummy-path` is passed to the plugin generator.
Fix #8121
*Yves Senn*
-* Ensure that RAILS_ENV is set when accessing Rails.env *Steve Klabnik*
+* Ensure that `RAILS_ENV` is set when accessing Rails.env *Steve Klabnik*
-* Don't eager-load app/assets and app/views *Elia Schito*
+* Don't eager-load `app/assets` and `app/views` *Elia Schito*
* Add `.rake` to list of file extensions included by `rake notes` and `rake notes:custom`. *Brent J. Nordquist*

0 comments on commit df9f9b7

Please sign in to comment.