Monday, 10 October 2011

Leonardo: Update to version 1.8

With the latest version 1.8 I added the chance to sort the columns by this approach:

I also added by default the auto submit to the search form on the index view when the values ​​are changed for fields like select, radio ... those with a net change of the value, avoiding the text box to not encumbering the database. However it is possible to add or remove this feature, by adding or removing the autosubmit class :

<%= f.collection_select :category_id, Category.all, :id, :name, {:prompt => true}, {:class => 'autosubmit'} %>

In custom.js file (called from application.js) I added a bind (or more precisely, a live):

$('.autosubmit').live('change', function() {
  setTimeout("$('#""').parents('form:first').submit();", 300);
  return false;

I use a timeout to run the submit after eventual updates, usually hidden fields coupled to self completions which currently leonardo does not handle but it will do soon.

With version 1.7 released in late September that I have introduced the option leospace:

rails g leosca decode name:string --leospace=admin

I fixed the code for compatibility with Ruby 1.9.2 which has a slightly different String class.

Now the development users are no longer created by migration, being a database population their place is in the file db / seeds.rb used with rake db: seed. Handy for db:reset or db: schema: load utilities that previously they deleted users.

Create the resource "decode " in no namespace and only the management under the namespace specified in the parameter leospace.

The original scaffold has something similar as well, let's take this example:
rails g scaffold admin/decode name:string

This creates the resource and its management in admin namespace.

We examine the differences:

Both will create paths in admin namespace:

With the scaffold, the resource is called Admin:: Decode and table admin_decodes

With leonardo, the resource is called only Decode and it is not under a namespace. The table is called decodes.

The transaction meets the need to create different interfaces for the same resource. Of course you can also use the original leonardo Methodology:
rails g leosca admin/decode name:string

The latest updates details:

1.8.3 (November 8th, 2011) Marco Mastrodonato
  • Controller/sort_column => Fixed an issue with multiple tables
  • Dev users are now added by rake db:seed, no more by migration
1.8.2 (October 10th, 2011) Marco Mastrodonato
  • List: Added id as first column
  • Replaced String.any? with String.size>0 for ruby 1.9.2 support

1.8.1 (October 10th, 2011) Marco Mastrodonato
  • Updated rspec to pass index view test with two new controller helpers
  •  Date managed with datepicker are now in year-month-day format and now works with sqlite3
  • Added autosubmit class by default. A new function in custom.js let you to autosubmit searches on filter fields change event
1.8.0 (October 7th, 2011) Marco Mastrodonato
  •  Added sortable columns
1.7.2 (October 5th, 2011) Marco Mastrodonato
  • Updated formtastic support to version 2.0
  • Updated template.rb
1.7.1 (October 3th, 2011) Marco Mastrodonato
  • Fixed a layout issue
1.7.0 (September 28th, 2011) Marco Mastrodonato
  • New feature to add a resource management within a namescape. Unlike the original way (rails g leosca admin/resource ...which remains available), the resource is not under the namespace but only its management so you could create one for several kind of users. Try it adding the new option like this example: --leospace=admin
  • Huge code improvements

No comments:

Post a Comment