Question: I have a `note` model. A `user` has many `notes`. At the moment, the `notes` are ordered by `date`, and then by `created_at`.

I would like to give users the ability to order the notes (within a date) themselves.

For instance, if this is how they are currently displayed:

```
Date1
    note1,note2,note3
Date2
    note4
Date3
    note5,note6

```

The user could reorder them as follows:

```
Date1
    note3,note1,note2
Date2
    note4
Date3
    note6,note5

```

What is the most efficient way to implement this in Rails? Should I used a linked list? Or something else?

I'm using Rails 3.0.1 and Ruby 1.9.2

Answer: 
The best way to do it is through a custom [Listener](http://download.oracle.com/docs/cd/B14099_19/web.1012/b14017/filters.htm). Being initialized before JSF servlet it should configure jul-to-slf4j bridge in [`contextInitialized(ServletContextEvent)`](http://download.oracle.com/javaee/6/api/javax/servlet/ServletContextListener.html#contextInitialized%28javax.servlet.ServletContextEvent%29).
I believe Mojarra, being Sun code, uses java.util.logging.

The slf4j project download contains a drop-in module which forwards all j.u.l statements to slf4j. You can then use log4j as the slf4j backend.