Sha256: bd518066616a6202ac16ef53218bc06e4c44d57d73ad72f1aa0e89ac2c29bcc7

Contents?: true

Size: 718 Bytes

Versions: 3

Compression:

Stored size: 718 Bytes

Contents

<h1><%= @title || "Listing posts" %></h1>

<%= magic_grid(@posts,
               [ :title,
                 {:col => :body, :to_s => Proc.new {|r| r.body.truncate(30)} },
                 :published,
                 :user,
                 { :label => 'Actions',
                   :to_s => Proc.new { |post| %>
                     <%= link_to 'Show', post %>
                     <%= link_to 'Edit', edit_post_path(post) %>
                     <%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %>
                   <% }
                 }
               ],
               :searchable => [:body, 'users.name'],
               :per_page => 5,
               :id => 2, :remote => true) %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
magic_grid-0.12.6 test/dummy/app/views/posts/by_user.html.erb
magic_grid-0.12.5 test/dummy/app/views/posts/by_user.html.erb
magic_grid-0.12.4 test/dummy/app/views/posts/by_user.html.erb