diff options
Diffstat (limited to 'railties/doc/guides/html/command_line.html')
-rw-r--r-- | railties/doc/guides/html/command_line.html | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/railties/doc/guides/html/command_line.html b/railties/doc/guides/html/command_line.html index 7f925bc10a..226a68e105 100644 --- a/railties/doc/guides/html/command_line.html +++ b/railties/doc/guides/html/command_line.html @@ -135,7 +135,7 @@ rails </tr></table>
</div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -171,7 +171,7 @@ http://www.gnu.org/software/src-highlite --> </div>
<div class="paragraph"><p>Here we’ll flex our <tt>server</tt> command, which without any prodding of any kind will run our new shiny Rails app:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -188,7 +188,7 @@ $ <span style="color: #990000">.</span>/script/server <h3 id="_generate">1.3. generate</h3>
<div class="paragraph"><p>The <tt>generate</tt> command uses templates to create a whole lot of things. You can always find out what’s available by running <tt>generate</tt> by itself. Let’s do that:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -222,7 +222,7 @@ Installed Generators </tr></table>
</div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -251,7 +251,7 @@ Modules Example<span style="color: #990000">:</span> Test<span style="color: #990000">:</span> test/functional/admin/credit_card_controller_test<span style="color: #990000">.</span>rb</tt></pre></div></div>
<div class="paragraph"><p>Ah, the controller generator is expecting parameters in the form of <tt>generate controller ControllerName action1 action2</tt>. Let’s make a <tt>Greetings</tt> controller with an action of <strong>hello</strong>, which will say something nice to us.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -267,7 +267,7 @@ http://www.gnu.org/software/src-highlite --> <div class="paragraph"><p>Look there! Now what all did this generate? It looks like it made sure a bunch of directories were in our application, and created a controller file, a functional test file, a helper for the view, and a view file.</p></div>
<div class="paragraph"><p>Let’s check out the controller and modify it a little (in <tt>app/controllers/greeting_controller.rb</tt>):</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -279,7 +279,7 @@ http://www.gnu.org/software/src-highlite --> <span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre></div></div>
<div class="paragraph"><p>Then the view, to display our nice message (in <tt>app/views/greeting/hello.html.erb</tt>):</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -287,7 +287,7 @@ http://www.gnu.org/software/src-highlite --> <span style="font-weight: bold"><span style="color: #0000FF"><p></span></span><%= @message %><span style="font-weight: bold"><span style="color: #0000FF"></p></span></span></tt></pre></div></div>
<div class="paragraph"><p>Deal. Go check it out in your browser. Fire up your server. Remember? <tt>./script/server</tt> at the root of your Rails application should do it.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -304,7 +304,7 @@ http://www.gnu.org/software/src-highlite --> </div>
<div class="paragraph"><p>"What about data, though?", you ask over a cup of coffee. Rails comes with a generator for data models too. Can you guess its generator name?</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -328,7 +328,7 @@ Examples<span style="color: #990000">:</span> <div class="paragraph"><p>But instead of generating a model directly (which we’ll be doing later), let’s set up a scaffold. A <strong>scaffold</strong> in Rails is a full set of model, database migration for that model, controller to manipulate it, views to view and manipulate the data, and a test suite for each of the above.</p></div>
<div class="paragraph"><p>Let’s set up a simple resource called "HighScore" that will keep track of our highest score on video games we play.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -371,7 +371,7 @@ dependency model </tr></table>
</div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -400,7 +400,7 @@ http://www.gnu.org/software/src-highlite --> <div class="paragraph"><p>Let’s say you’re creating a website for a client who wants a small accounting system. Every event having to do with money must be logged, and must never be deleted. Wouldn’t it be great if we could override the behavior of a model to never actually take its record out of the database, but <strong>instead</strong>, just set a field?</p></div>
<div class="paragraph"><p>There is such a thing! The plugin we’re installing is called "acts_as_paranoid", and it lets models implement a "deleted_at" column that gets set when you call destroy. Later, when calling find, the plugin will tack on a database check to filter out "deleted" things.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -412,7 +412,7 @@ http://www.gnu.org/software/src-highlite --> <h3 id="_runner">1.7. runner</h3>
<div class="paragraph"><p><tt>runner</tt> runs Ruby code in the context of Rails non-interactively. For instance:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -420,7 +420,7 @@ http://www.gnu.org/software/src-highlite --> <h3 id="_destroy">1.8. destroy</h3>
<div class="paragraph"><p>Think of <tt>destroy</tt> as the opposite of <tt>generate</tt>. It’ll figure out what generate did, and undo it. Believe you-me, the creation of this tutorial used this command many times!</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -449,7 +449,7 @@ $ <span style="color: #990000">.</span>/script/destroy model Oops <h3 id="_about">1.9. about</h3>
<div class="paragraph"><p>Check it: Version numbers for Ruby, RubyGems, Rails, the Rails subcomponents, your application’s folder, the current Rails environment name, your app’s database adapter, and schema version! <tt>about</tt> is useful when you need to ask help, check if a security patch might affect you, or when you need some stats for an existing Rails installation.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 2.11.1
+<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
|