Sha256: 288c4c551a5c01dd2919014336d165f5f66bec57f10089227814fd49d816ece3
Contents?: true
Size: 1.21 KB
Versions: 13
Compression:
Stored size: 1.21 KB
Contents
<h1>Listing products</h1> <%= table_for @products, # :after_table_controls => [:paginator, "Hahaha!", :info_text], :control_div_class_after => nil, # :translate => proc {|x| "`#{x}`"}, :batch_actions_type => :buttons, # :select_controls => [:select_all, :select_none], :batch_actions => { :activate => "Activate", :deactivate => "Deactivate", :foo => "Foo" } do |t| t.checkbox :html => {:class => 'muff'} t.column :id, :filter => false, :align => :right, :header => "id" t.column :title, :filter => :like, :link => :product_url t.column :price, :align => :right, :format => :euro, #"%.2f €", :filter => :range, :filter_width => '20px', :range_filter_symbol => ' bis ' t.column :active, :filter => { 'ja' => 't', 'nein' => 'f' } t.column :description do |record| record.description[0..40] end t.association :vendor, :id, :method => :name, :header => "Vendor".l, :filter => Vendor.all.map{|v| [v.name, v.id] } t.association :tags, :title, :join_symbol => ', ', :format => proc {|a| "[#{a.upcase}]" } t.action :header => 'Actions', :filter => false do |record| link_to "Edith", edit_product_url(record) end end %> <%= link_to 'New Product', new_product_path %>
Version data entries
13 entries across 13 versions & 1 rubygems