2013/04/06 NDS no.31 に寄せて by @dictav
- Don't Repeat Yourself (原則を徹底する)
- Conversion Over Configuration (設定よりも規約)
- ジェネレータによってフレームワークが開発者をドライブする
- リソース中心のRESTFULなWEBアプリケーション設計
- Write Less Code(ごちゃごちゃコードを書くな)
- Model/View/Controllerの分離
- Erb
- Haml
- Slim
- etc...
<ul>
<%- for a in @list %>
<li><%= a.name %>
<%- end %>
</ul>
- Pagination
- Breadcrumbs
- ActiveAdmin
- etc...
<ul>
<%- for a in @list %>
<li><%= a.name %>
<%- end %>
</ul>
<%= will_paginate @list, :prev_label=>'«前', :next_label=>'次»' %>
<%= javascript_tag do %>
$('#users li').click(function() {
$.get("<%= user_path(9999) %>".replace('9999', $(this).data('id')),
function(data) { $('#show_area').html(data) } )
})
<% end %>
<ul id="users">
<%- for a in @list %>
<li data-id="<%= a.id%>"><%= a.name %>
<%- end %>
</ul>
<%= will_paginate @list, :prev_label=>'«前', :next_label=>'次»' %>
# _人人人人人人人_ #
# > JavaScript! < #
#  ̄Y^Y^Y^Y^Y^Y ̄ #