aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/rails_guides/textile_extensions.rb3
-rw-r--r--railties/guides/source/getting_started.textile9
2 files changed, 6 insertions, 6 deletions
diff --git a/railties/guides/rails_guides/textile_extensions.rb b/railties/guides/rails_guides/textile_extensions.rb
index 352c5e91dd..0887ebf76b 100644
--- a/railties/guides/rails_guides/textile_extensions.rb
+++ b/railties/guides/rails_guides/textile_extensions.rb
@@ -15,10 +15,11 @@ module RailsGuides
end
def tip(body)
- body.gsub!(/^TIP[.:](.*)$/) do |m|
+ body.gsub!(/^TIP[.:](.*?)(\n\Z|\n\n+|\Z)/m) do |m|
result = "<div class='info'><p>"
result << $1.strip
result << '</p></div>'
+ result << $2 if $2
result
end
end
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index c2c8ee02ad..41af90e720 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -193,14 +193,13 @@ principles:
* Using resource identifiers such as URLs to represent resources.
* Transferring representations of the state of that resource between system components.
-For example, to a Rails application a request such as this:
+For example, the following HTTP request:
<tt>DELETE /photos/17</tt>
-would be understood to refer to a photo resource with the ID of 17, and to
-indicate a desired action - deleting that resource. REST is a natural style for
-the architecture of web applications, and Rails hooks into this shielding you
-from many of the RESTful complexities and browser quirks.
+refers to a photo resource with an ID of 17 and indicates an action to be taken
+upon it: deletion. REST is a natural web application architecture which Rails
+abstracts, shielding you from RESTful complexities and browser quirks.
If you'd like more details on REST as an architectural style, these resources
are more approachable than Fielding's thesis: