Permalink
Browse files

format README to be readable

  • Loading branch information...
1 parent 77fe47d commit 3f1ade7c1d014dcef9388b94137693ffc97b38c7 samgooi4189 committed Oct 7, 2012
Showing with 54 additions and 49 deletions.
  1. +54 −49 README.md
View
103 README.md
@@ -10,69 +10,74 @@ Experiment rails and detect common FAQ
* git init<br />
* git add .<br />
* git commit -m "First Push"<br />
-* git remote add origin https://github.com/blabla/bla.git
+* git remote add origin https://github.com/blabla/bla.git<br />
&lt;https is your github repo url&gt;<br />
-* git pull origin master
+* git pull origin master <br />
&lt;if you create a readme in git&gt;<br/>
* git push origin master<br/>
&lt;you are done&gt;
-check status:
-git status / git log
+<h2>check status:</h2>
+* git status / git log
-get started with changing index page:
-rake db:create
-rails generate controller home index <=This will create a controller
- & index.html.erb in app/views/home>
-modify routes.rb change root :to =>"home#index"
+<h2>get started with changing index page:</h2>
+* rake db:create<br />
+* rails generate controller home index<br />
+&lt;=This will create a controller<br />
+&amp; index.html.erb in app/views/home&gt;<br />
+* modify routes.rb<br />
+change root :to =&gt;"home#index"
-Create resources using Scaffold:
-rails generate scaffold Post name:string title:string context:text
-<check db/migrate/...rb to view the database structure>
-<the def change is the function called when db migrate, creating tables with defined types>
-rake db:migrate
+<h2>Create resources using Scaffold:</h2>
+* rails generate scaffold Post name:string title:string context:text<br />
+&lt;check db/migrate/...rb to view the database structure&gt;<br />
+&lt;the def change is the function called when db migrate, creating tables with defined types&gt;<br />
+* rake db:migrate
-To migrate db:
-rake db:migrate <this will only effect development>
-If need to specify:
-rake db:migrate RAILS_ENV=production
-\_\_\_
+<h2>To migrate db:</h2>
+* rake db:migrate<br />
+&lt;this will only effect development&gt;<br />
+<h3>If need to specify:</h3>
+* rake db:migrate RAILS&lowbar;ENV=production
-To set validation on creating new record:
-go to app/model/post.rb, and add this into Class:"
-validates :names, :presence => true
-validates :title, :presence => true,
- :length => {:minimum => 5}
-"
+<h3>To set validation on creating new record:</h3>
+* go to <b>app/model/post.rb</b>, and add this into Class:"<br />
+validates :names, :presence =&gt; true<br />
+validates :title, :presence =&gt; true,<br />
+:length =&gt; {:minimum =&gt; 5}<br />
+"<br />
This will ensure names and title need to filled before submit.
-To load the updated code while in console:
-<run> reload!
+<h2>To load the updated code while in rails console:</h2>
+* reload!
-Before bundle with pg:
-sudo apt-get install libpq-dev
+<h2>Before bundle with pg:</h2>
+* sudo apt-get install libpq-dev
-Deploy to heroku:
-add gem 'heroku' in Gemfile
-configure Gemfile:
-group :development, :test do
- gem 'sqlite'
-end
-group :production do
- gem 'pg'
-end
-sudo apt-get install postgresl <if you dont install postresql locally, you wont able to install pg>
-bundle install
-heroku run rake db:migrate
-type in command:
-wget -qO- https://toolbelt.heroku.com/install.sh | sh
-heroku login
-git add .
-git commit -m "init deploy"
-heroku create <will create new app at heroku>
-heroku key:add <if you dont have rsa key stored at heroku yet>
-git push heroku master
+<h2>Deploy to heroku:</h2>
+* add gem 'heroku' in Gemfile<br />
+* configure Gemfile:<br />
+group :development, :test do<br/>
+ gem 'sqlite'<br />
+end<br/>
+group :production do<br />
+ gem 'pg'<br />
+end<br />
+* sudo apt-get install postgresl<br />
+&lt;if you dont install postresql locally, you wont able to install pg&gt;<br />
+* bundle install<br />
+* heroku run rake db:migrate<br />
+* <b>type in command:</b> <br />
+wget -qO- https://toolbelt.heroku.com/install.sh | sh<br />
+heroku login<br />
+git add .<br />
+git commit -m "init deploy"<br />
+heroku create<br />
+&lt;will create new app at heroku&gt;<br />
+heroku key:add<br />
+&lt;if you dont have rsa key stored at heroku yet&gt;<br />
+git push heroku master<br />

0 comments on commit 3f1ade7

Please sign in to comment.