views:

259

answers:

1

Has anyone gotten a Rails application playing well with JQuery UI and Themes I would like to build a generic application which includes common basic layouts, styles, authentication and various other optional tools.

The idea is to build this basic application using a rake and setup yml files.

Once run, I would like to be able to "skin" or theme such an application for various use cases and wondered if anyone has actually used JQuery UI with Rails and how easy it is do integrate.

If you can recommend any starting points I would most appreciate it.

Thanks in advance.

+1  A: 

Ideally, your javascript is going to be fairly decoupled from your backend. Rails shoudn't need to 'integrate' with jQuery. Rails should be there to simply to handle the requests and response flow. jQuery UI takes already working elements and transforms them into themeable widgets. Most of your UI elements are actually just progressive enhancements on a working site. The theming that jQuery UI provides is as simple as switching folders, or setting a variable. You could have a control in rails to determine the path of the theme, but jQuery UI is built to be themeable on its own, anything rails would do to change that would be something along the lines of file_path = '../js/custom_theme'.

Short answer: Yes. It's quite simple to integrate jQuery and Rails, because neither has to know about the other.

Alex Sexton