$ bundle exec rake routes CONTROLLER=companies/offices
とかなんとか
$ rails db<[SQLfilePath] |
わりとdecoratorに書いてある。 | |
っていうかなんとかpathでgit grepするといいのか |
$ bundle exec rake routes CONTROLLER=companies/offices
とかなんとか
= "#{@person.try(:name)}" | |
-# もしくは | |
= "#{"#{@person.name}" if @person.name.present?}" |
-# @usersからnameを5ことりだして,でつなげる | |
= @users[0..4].map(&:name).join(', ') | |
-#これらでもよい(というかこっちの方が実行効率がわずかによいらしい) | |
= @users[0, 5].map(&:name).join(', ') | |
= @users.take(5).map(&:name).join(', ') | |
= @users.first(5).map(&:name).join(', ') |
// ~/.js/github.com.js | |
$('a.header-logo-invertocat').css({'padding-top': '2px', 'padding-bottom': '0'}).html( | |
$('<img>') | |
.attr('src', 'http://docs.komagata.org/theme/p0t/images/movable_face.gif') | |
.css({'width': 'auto', 'height': '34px'}) | |
); |
- @users.each do |user| | |
%p.user{class: cycle('', '', 'nth-child-3')} | |
%span.name= user.name |
= @user.name.capitalize |
$ rails c
User モデルの一個目のデータを"u" に代入(モデルは大文字はじまり・単数)
irb(main):000:0> u = User.first
↓ 一個目出る
//そのうちきれいに清書する
http://pqrs.org/macosx/keyremap4macbook/index.html.ja
Control_L to Control_L
(+ When you type Control_L only, send Escape)