■
content_tag
content_tag - リファレンス - Railsドキュメント
こうすればliとか1つでまとめてかける感じがして良い。
bootstrap3関連
flash messageでbootstrapのclass="alert …" 系を出てくるようにする。
James Brooks : Ruby on Rails Flash messages with Bootstrap
def flash_class(level) case level when :notice then "alert alert-info" when :success then "alert alert-success" when :error then "alert alert-error" when :alert then "alert alert-error" end end
で書きたいところに
<% flash.each do |key, value| %> <div class="<%= flash_class(key) %>"> <%= value %> </div> <% end %>
今作ってるもの
ハガキ職人を皆に投稿してもらうような感じ。
Issues · kimihito/syokunin-map
stagingなのに、丸見えというね。技術力の低さを痛感しています。
メモがてらに
ちゃんと何をググって何がわかったかってのを書いておくようにしておかねばとおもったので書いた。