Skip to content

Latest commit

 

History

History
124 lines (87 loc) · 4.23 KB

Changelog.textile

File metadata and controls

124 lines (87 loc) · 4.23 KB

Changelog for tabulatr

  • Fixed :filter_width not working for select filters.
  • Giving a Hash as :format option gives the corresponding value.
  • We now allow column presets:

    Tabulatr.config do |config|
    #…
    config.column_presets({
    config.column_presets({
    :action_column => {:width => ’100px’},
    :smallint => { :width => ‘55px’, :filter_width => ‘30px’, :align => ‘right’ },
    :id => :smallint,
    :sid => { :width => ‘200px’, :filter_width => ‘170px’, :filter => :like },
    :title => { :filter => :like },
    :count => { :map => false, :width => ‘40px’, :filter => false, :align => ‘right’ },
    :moo => { :width => ‘155px’, :filter_width => ‘120px’, :align => ‘right’ }
    })
    end

Now, every column will check whether there is as entry corresponding to its name in this table and get the content as ‘default’ options.

<%= table_for @regions do |t|
t.column :id
t.column :sid

  1. end %>

so, the :id column has all the options defined above. The :action_column entry is used for ‘action’ columns.

But even better, you can use arbitrary presets:

t.column :foo, :preset => :moo

gets the :moo preset.

0.4.2

  • Fixed two more bugs breaking ruby 1.8 compatibility. (Thanks to moabite for reporting)

0.4.1

  • Fixed a “bug” breaking ruby 1.8 compatibility. (Thanks to moabite for reporting)

0.4.0

  • Mongoid now really works.
  • A lot of cleanup in the finder code (million thanks to plukevdh)
  • You can use table_for for ‘normal’ arrays that weren’t found with find_for_table.
  • Added a :name_mapping option to find_for_table to allow filtering by compund expressions, example:
@customers = Customer.find_for_table(params,
name_mapping: {
name: ‘(“addresses”.“firstname” || \’ \’ || “addresses”.“lastname”)’,
address: ‘(“addresses”.“street” || \’ \’ || “addresses”.“zip_code” || \’ \’ || “addresses”.“city”)’
},
default_order: ‘updated_at desc’
)
  • Added Mysql2Adapter to the ActiveRecord connection list (thanks to AaronLasseigne).
  • Monkeypatch mongoid only if it is present. (thanks to rwz)

0.3.0

  • Converted into a Rails 3.1 engine and moved css and images to use the new asset pipeline. Works with 3.0.x — ’opefully. Thanks to all that reported the problem.
  • Header cells are now auto translated. Thanks to niedhui!

0.2.1

  • Fixed a ruby 1.8 syntax issue. (Thanks to TBAA for reporting.)

0.2.0

  • Mongoid can also be used in place of ActiveRecord
  • fixed handling of the primary_key column and name
  • Added dom_id to tables tr. Thanks to sterrym (Tim Glen)!
  • Added note on “Request-URI Too Large error” to README

0.1.3

0.1.2

  • Fixed bug with nil exception on ‘empty’ belongs_to association. Thanks to dgm!

0.1.1

  • Fixed bug with “Select …” buttons introduced in 0.1.0.
  • Added tests for these buttons.

v0.1.0

  • new find_for_table option :stateful. If
  MyFancyModel.find_for_table params, :stateful => session

is given, the current sorting, filtering, selecting and paging information is stored to the session and restored when reopened. Great for procession specifically filtered lists.

v0.0.5 (2011-03-28)

  • new column option :map (defaults to true) to disable automatic mapping on the enries of the association as in
<%= table_for @products do |t|
…
t.association :tags, :title # mapped to all tags
t.association :tags, :count, :map => false # called on the list-of-tags
end %>

v0.0.4 (2011-03-27)

  • fixed the path to paging/sorting images installed by generator. Thanks to sdsykes!