RailsCasts Pro episodes are now free!

Learn more or hide this

Michael Berkovich's Profile

GitHub User: berk

Site: http://www.geni.com

Comments by Michael Berkovich

Avatar

Thank you for your feedback. I am guilty of not providing enough documentation.
Since the gem was mostly used on internal projects, like tr8n admin tools and others, i never did my part on documenting it.

Well, i am fixing this now. Here is a document on customizing the table view:

https://github.com/berk/will_filter/wiki/Customizing-Table-View

Avatar

It currently exports to HTML, CSV, XML and JSON. So there is no dependency on any 3rd party library other than Kaminari (for pagination - which is also soon to be changed - so you can plug any pagination library or use will_filter's one).

You just gave me a great idea to add support for PDF. Thank you. I will research which PDF gem would be the best one to use. Very well could be Prawn PDF.

Btw, currently you can plug your own exporters/formats into your custom filter object, so you could generate sophisticated reports. At Geni, we use a few custom reports for various tables.

Avatar

Looks pretty nice. Have you tried using will_filter gem? It does similar things, and it also allows you to build powerful queries as well as save filters and share them across multiple users. You can build an entire admin tool in just 5 lines of code.

https://github.com/berk/will_filter

Avatar

Has anyone tried tr8n?

http://github.com/berk/tr8n

http://wiki.tr8n.org/slides

No need for YML files, full support for language context rules and language cases. Uses crowd-sourced or professional translator provided translations.

Here is what some of the translations would look like. t method is replaced with tr.

<%= tr("Hello World!") %>

<%= tr("Name:", "User name label") %>

  • uses description to provide context for the label

<%= tr("You have {count|| message} in your mailbox.", nil, {count: 5}) %>

  • will use numeric rules and inflectors to provide the right form for message/messages

<%= tr("{actor} sent {target::dat} a message.", nil, {actor:user1, target:user2}) %>

  • will use gender of {actor} user to provide the right form for word "sent" and apply Dative language case to the name of target user token.

<%= tr("{actor} sent {target::dat} [strong: {count|| message}].", nil, {actor:user1, target:user2, count:5}) %>

  • similar to the above example, but also adds a decoration token around the number of messages. Here is an example in English:

Michael sent Anna 5 messages.

In Russian this would need 9 translations based on the gender of actor (male, female, unknown) as well as value of count: 3 cases as well. It can translate names as well, if you so desire.

Михаил послал Анне 5 сообщений.

The technology is very powerful and has been used by Geni and Yammer and a few other companies and is now open sourced.

(Disclaimer: I am a tr8n developer)