• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
Recently, I've been making web sites by using Merb. It was like a battle lacking logistics. I made and released dm-pagination on github. Yes, I know dm-is-paginated-0.0.1, but its spec files was not working. The dm-pagination is able to be used with arbitrary collections which include scoped_query. You can easily paginate, like this: ruby>> class Posts def index @posts = Post.paginate(:page => params[:page]) end <<-- Links will be drawn by calling simple helper method. html>>
    <% @posts.each do |post| %>
  • <%= h(post.body) %>
  • <% end %>
<%= paginate @posts %> <<-- [merb_slice-gen](http://github.com/genki/merb_slice-gen/tree/master) is also available in order to provide useful generators for slices of which it has namespace but doesn't have subdirectories. You can generate controller, resource and resource_controller in slice project, like this pre>> % slice-gen controller top <<-- it generates controller files enclosed by SliceName module without any subdirectories. In addition, there are other gems I made. * [genki-merb_component (0.1.1)](https://github.com/genki/merb_component/tree) * [genki-merb_recognize_path (0.0.2)](https://github.com/genki/merb_recognize_path/tree) * [genki-merb_timezone_select (0.0.2)](https://github.com/genki/merb_timezone_select/tree)
posted by takiuchi takiuchi on Thu 15 Jan 2009 at 02:33 with 0 comments