ncri/ajaxify_rails — pull request #4 by kbparagua (2013-03-29 18:13:03+00:00)
Title: :ajaxify_container option for render to dynamically change container on controller

Hi,

I've been using your gem for a while, and it's been great. :) Good Job!

But, as of now, changing of container can only be done in javascript using the `Ajaxify.set_content_container()` method. I think this option is not enough, since there are times that you want to set the container before even rendering the response.

I added a new option on render to dynamically set the container where the response will be rendered.

Example:
```ruby
def new
@user = User.new
render :new, :ajaxify_container => "not-the-main-container"
end
```

In the example above, the response will be rendered inside `#not-the-main-container` element. Then after rendering the response, `content_container` will be set again to its original value. Meaning `not-the-main-container` will only be used on this specific action and not on the following actions.

Anyway, the `ajaxify_loader` still renders on the original content_container not on the passed `ajaxify_container`. I'm still thinking of a way to solve this.

Thanks!

NOTE: I'm not normally writing in coffeescript, so just edit my code based on your preference style.