resources :users do
get 'hoge' # 1
get ':id/hoge' # 2
endresources :users do
collection do| source :rubygems | |
| gem 'garb' | |
| gem 'active_support' |
| source :rubygems | |
| gem 'clockwork' | |
| gem 'heroku' | |
| gem 'active_support' | |
| gem 'lingman', git: 'git://github.com/hrysd/lingman.git' |
| .field_with_errors | |
| @include formFieldState(#b94a48, #ee5f5b, lighten(#ee5f5b, 30%)) | |
| @extend .error |
resources :users do
get 'hoge' # 1
get ':id/hoge' # 2
endresources :users do
collection do| git push origin :BRACH_NAME |
| CC = "gcc" | |
| task :default => "hello" | |
| file "hello" => "hello.o" do | |
| sh "#{CC} -o hello hello.o" | |
| end | |
| file "hello.o" => "hello.c" do | |
| sh "#{CC} -c hello.c" |
| #/Users/hrysd/Sites/project/.htaccess | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteBase /~hrysd/project | |
| RewriteRule ^$ app/webroot/ [L] | |
| RewriteRule (.*) app/webroot/$1 [L] | |
| </IfModule> |
| #質問した年月日をつかってTimeクラスのインスタンスを作る。 | |
| myTime = Time.new(year, month, day) | |
| # 今日の日付を作る | |
| now = Time.new | |
| #今日と聞いた日付の年の差を求める。 | |
| age = now.year - myTime.year |
| <% if @entry.prev %> | |
| <a href="<%= url(@entry.prev.link) %>">prev</a> | |
| <% end %> | |
| <% if @entry.next %> | |
| <a href="<%= url(@entry.next.link) %>">next</a> | |
| <% end %> |