From d3823a12eca3e718e31768931d4571d7232d731a Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Fri, 16 Mar 2012 14:40:21 +0800 Subject: [PATCH] . --- _output/rails-routes.html | 30 +++++++++++++++++++++--------- index.haml | 2 +- tig.md | 37 +++++++++++++++++++++---------------- 3 files changed, 43 insertions(+), 26 deletions(-) diff --git a/_output/rails-routes.html b/_output/rails-routes.html index 70fcc5ad3..09062df21 100644 --- a/_output/rails-routes.html +++ b/_output/rails-routes.html @@ -6,15 +6,8 @@ -

Rails-routes

-

mapping

- -

Guides/Routing

- -

ActionDispatch::Routing::Mapper -(See included modules)

- -

Multiple resources

+

Rails Routes

+

Multiple resources

resources :books
 # PhotosController:
@@ -66,6 +59,17 @@ match 'photo/*path' => 'photos#unknown'    # /photo/what/ever
 match 'photos/:id' => 'photos#show', :defaults => { :format => 'jpg' }
 
+

Get/post

+ +

get is the same as match via: :get.

+ +
get 'photo/:id' => 'photos#show'
+# same as match 'photo/:id' => 'photos#show', via: :get
+
+post 'photo/:id' => 'photos#update'
+# same as match 'photo/:id' => 'photos#show', via: :post
+
+

Redirection

match '/stories' => redirect('/posts')
@@ -189,6 +193,14 @@ root :to => 'welcome#index'
 match ':controller(/:action(/:id(.:format)))'
 
+

References

+ + + diff --git a/index.haml b/index.haml index 36a3259a3..00c8728a8 100644 --- a/index.haml +++ b/index.haml @@ -4,7 +4,7 @@ title: Cheat sheets - Dir['./*.*'].each do |p| - name = File.basename(p, '.*') - ext = File.extname(p) - - next if %w[.sass .scss].include?(ext) || %w[config Gemfile index].include?(name) || name[0] == '_' + - next if %w[.sass .scss].include?(ext) || %w[config Gemfile Rakefile README index].include?(name) || name[0] == '_' - url = name + ".html" %li %a{href: url}= name diff --git a/tig.md b/tig.md index 074bad5b2..8043d453e 100644 --- a/tig.md +++ b/tig.md @@ -1,7 +1,12 @@ Tig shortcuts ------------- -Invocation +### Installing + + $ brew install tig --HEAD + $ apt-get install tig + +### Invocation tig blame FILE tig master # Show a branch @@ -9,24 +14,24 @@ Invocation tig FILE # Show history of file tig v0.0.3:README # Show contents of file in a specific revision -All views ---------- +### All views - * `^N` - Next on parent view - * `^P` - Previous on parent view + ^N # Next on parent view + ^P # Previous on parent view -`m` - Main view - * `D` - Toggle between date display modes - * `A` - Toggle between author display modes - * `C` - Cherry pick a commit +### `m` - Main view -`S` - Stage view + D # Toggle between date display modes + A # Toggle between author display modes + C # Cherry pick a commit - * `u` - Stage/unstage file or chunk - * `!` - Revert file or chunk - * `C` - Commit - * `M` - Merge +### `S` - Stage view -`H` - Branch view + u # Stage/unstage file or chunk + ! # Revert file or chunk + C # Commit + M # Merge - * `i` - Change sort header +### `H` - Branch view + + i # Change sort header