Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/lifo/docrails
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Mar 6, 2011
2 parents 5e7ce47 + 6ce844a commit 89d825d
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 15 deletions.
5 changes: 4 additions & 1 deletion actionmailer/lib/rails/generators/mailer/USAGE
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
Description:
============
Stubs out a new mailer and its views. Pass the mailer name, either
CamelCased or under_scored, and an optional list of emails as arguments.

This generates a mailer class in app/mailers and invokes your template
engine and test framework generators.

Example:
`rails generate mailer Notifications signup forgot_password invoice`
========
rails generate mailer Notifications signup forgot_password invoice

creates a Notifications mailer class, views, test, and fixtures:
Mailer: app/mailers/notifications.rb
Views: app/views/notifications/signup.erb [...]
Test: test/functional/notifications_test.rb
Fixtures: test/fixtures/notifications/signup [...]

2 changes: 1 addition & 1 deletion activesupport/lib/active_support/backtrace_cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module ActiveSupport
# filter or modify the paths of any lines of the backtrace, you can call BacktraceCleaner#remove_filters! These two methods
# will give you a completely untouched backtrace.
#
# Example:
# ==== Example:
#
# bc = BacktraceCleaner.new
# bc.add_filter { |line| line.gsub(Rails.root, '') }
Expand Down
12 changes: 6 additions & 6 deletions activesupport/lib/active_support/configurable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@ def #{name}=(value); config.#{name} = value; end
end

# Reads and writes attributes from a configuration <tt>OrderedHash</tt>.
#
# require 'active_support/configurable'
#
#
# require 'active_support/configurable'
#
# class User
# include ActiveSupport::Configurable
# end
# end
#
# user = User.new
#
#
# user.config.allowed_access = true
# user.config.level = 1
#
# user.config.allowed_access # => true
# user.config.level # => 1
#
#
def config
@_config ||= self.class.config.inheritable_copy
end
Expand Down
11 changes: 11 additions & 0 deletions activesupport/lib/active_support/core_ext/hash/reverse_merge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,23 @@ class Hash
#
# options = options.reverse_merge(:size => 25, :velocity => 10)
#
<<<<<<< HEAD
# The default <tt>:size</tt> and <tt>:velocity</tt> are only set if the +options+ hash passed in doesn't already
# have the respective key.
#
# As contrast, using Ruby's built in <tt>merge</tt> would require writing the following:
#
# def setup(options = {})
# options = { :size => 25, :velocity => 10 }.merge(options)
# end
=======
# is equivalent to
#
# options = {:size => 25, :velocity => 10}.merge(options)
#
# This is particularly useful for initializing an options hash
# with default values.
>>>>>>> 20768176292cbcb883ab152b4aa9ed8c664771cd

This comment has been minimized.

Copy link
@tenderlove

tenderlove Mar 6, 2011

Member

Ruh roh. Mergefail.

def reverse_merge(other_hash)
other_hash.merge(self)
end
Expand Down
4 changes: 4 additions & 0 deletions activesupport/lib/active_support/core_ext/object/blank.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ def blank?
respond_to?(:empty?) ? empty? : !self
end

<<<<<<< HEAD
# An object is present if it's not #blank?.
=======
# An object is present if it's not <tt>blank?</tt>.
>>>>>>> 20768176292cbcb883ab152b4aa9ed8c664771cd
def present?
!blank?
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'active_support/core_ext/hash/keys'

# This class has dubious semantics and we only have it so that
# people can write params[:key] instead of params['key']
# people can write <tt>params[:key]</tt> instead of <tt>params['key']</tt>
# and they get the same value for both keys.

module ActiveSupport
Expand Down Expand Up @@ -109,7 +109,7 @@ def merge(hash)
end

# Performs the opposite of merge, with the keys and values from the first hash taking precedence over the second.
# This overloaded definition prevents returning a regular hash, if reverse_merge is called on a HashWithDifferentAccess.
# This overloaded definition prevents returning a regular hash, if reverse_merge is called on a <tt>HashWithDifferentAccess</tt>.
def reverse_merge(other_hash)
super self.class.new_from_hash_copying_default(other_hash)
end
Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/i18n_railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def self.reloader
@reloader ||= ActiveSupport::FileUpdateChecker.new([]){ I18n.reload! }
end

# Add I18n::Railtie.reloader to ActionDispatch callbacks. Since, at this
# Add <tt>I18n::Railtie.reloader</tt> to ActionDispatch callbacks. Since, at this
# point, no path was added to the reloader, I18n.reload! is not triggered
# on to_prepare callbacks. This will only happen on the config.after_initialize
# callback below.
Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/log_subscriber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module ActiveSupport
# ActiveRecord::LogSubscriber.attach_to :active_record
#
# Since we need to know all instance methods before attaching the log subscriber,
# the line above should be called after your ActiveRecord::LogSubscriber definition.
# the line above should be called after your <tt>ActiveRecord::LogSubscriber</tt> definition.
#
# After configured, whenever a "sql.active_record" notification is published,
# it will properly dispatch the event (ActiveSupport::Notifications::Event) to
Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/message_encryptor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module ActiveSupport
#
# The cipher text and initialization vector are base64 encoded and returned to you.
#
# This can be used in situations similar to the MessageVerifier, but where you don't
# This can be used in situations similar to the <tt>MessageVerifier</tt>, but where you don't
# want users to be able to determine the value of the payload.
class MessageEncryptor
class InvalidMessage < StandardError; end
Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/message_verifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'active_support/core_ext/object/blank'

module ActiveSupport
# MessageVerifier makes it easy to generate and verify messages which are signed
# +MessageVerifier+ makes it easy to generate and verify messages which are signed
# to prevent tampering.
#
# This is useful for cases like remember-me tokens and auto-unsubscribe links where the
Expand Down
2 changes: 1 addition & 1 deletion railties/guides/source/active_record_querying.textile
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ Client.limit(5).offset(30)
will return instead a maximum of 5 clients beginning with the 31st. The SQL looks like:

<sql>
SELECT * FROM clients LIMIT 5, 30
SELECT * FROM clients LIMIT 5 OFFSET 30
</sql>

h3. Group
Expand Down
14 changes: 14 additions & 0 deletions railties/guides/source/contributing_to_ruby_on_rails.textile
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,20 @@ Please make sure the patch does not introduce whitespace errors:
$ git apply --whitespace=error-all mynew_patch.diff
</shell>

You can check your patches by applying your patch to an different dedicated branch:

<shell>
$ git checkout -b testing_branch
$ git apply --check my_new_patch.diff
</shell>

You can make sure your patches don't add any whitespace by applying it yourself using the --whitespace=error-all option. Make sure you are on your dedicated test branche and:

<shell>
$ git apply --whitespace=error-all mynew_patch.diff
</shell>


h4. Create a Lighthouse Ticket

Now create a ticket with your patch. Go to the "new ticket":http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/new page at Lighthouse. Fill in a reasonable title and description, remember to attach your patch file, and tag the ticket with the ‘patch’ tag and whatever other subject area tags make sense.
Expand Down

2 comments on commit 89d825d

@r00k
Copy link
Contributor

@r00k r00k commented on 89d825d Mar 6, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there were some merge conflicts.

@fxn
Copy link
Member Author

@fxn fxn commented on 89d825d Mar 6, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh shit, git didn't tell. Gonna fix them. Thanks for the heads up!

Please sign in to comment.