RobinBrouwer/gritter — pull request #27 by indykish (2013-01-19 12:12:47+00:00)
Title: For Rails 3.2.11, new argument nodom_wrap to skip jQuery - DOM Ready function code.

We are using `Rails 3.2.11`

##### Usage add_gritter helper or gflash,
```ruby
<%= add_gritter(:success,"The product has been created successfully")

redirect_to, :gflash => {:success => {:value => "The ..."}}
```

The current gritter rails helper code produces the following JQuery code when the above is called.

```js
jQuery(function() {
jQuery.gritter.add({image:'/assets/success.png',title:'Success',
text:'The product has been created successfully!'})
});
```
The growl notification never appeared. It didn't work in our case as we already had various JQuery plugins loaded in our DOM.

When tried to execute as below, it just worked. Basically removing the `jQuery(function() )`

```js
jQuery.gritter.add({image:'/assets/success.png',title:'Success',
text:'The product has been created successfully!'});
```
So to fix the above problem, we added a flag `:nodom_wrap => true` which `when present` produces the code shown above(not wrapped in DOM).

Fixed the documentation as well.
Its an
*optional argument.
*The default behaviour stays the same.