This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Thu Apr 17 10:08:39 -0700 2008 | |
| |
CHANGELOG | Fri Apr 18 15:56:09 -0700 2008 | |
| |
CONTRIBUTORS | Fri Apr 18 15:56:09 -0700 2008 | |
| |
MIT-LICENSE | Fri Feb 08 15:18:20 -0800 2008 | |
| |
README | Sat Jul 19 19:49:35 -0700 2008 | |
| |
Rakefile | Tue May 13 19:53:51 -0700 2008 | |
| |
init.rb | Fri Feb 08 15:18:20 -0800 2008 | |
| |
install.rb | Fri Feb 08 15:18:20 -0800 2008 | |
| |
lib/ | Mon Nov 24 09:46:41 -0800 2008 | |
| |
public/ | Fri Oct 31 11:14:42 -0700 2008 | |
| |
spec/ | Mon Nov 24 09:46:41 -0800 2008 | |
| |
tasks/ | Tue May 13 19:53:51 -0700 2008 | |
| |
uninstall.rb | Fri Feb 08 15:18:20 -0800 2008 |
README
YUI 4 Rails =========== YUI 4 Rails is a plugin for easier integration of YUI components/widgets into a Rails application. Initially, we will only be offering two components, datatable and charts, however more will follow. We also encourage others to help convert their favorite components for the plugin and contribute it back to the community. Installation =========== As with plugins, you can install YUI 4 Rails either from archive or subversion. Via Subversion: script/plugin install svn://rubyforge.org/var/svn/yui4rails/tags/yui4rails-0.1.1 Via archive: Download either the tar.gz or zip file and extract it into your RAILS_APP/vendor/plugins directory. For those of you wishing to be more on the cutting edge of the plugin, please use my github repo at: http://github.com/mghaught/yui4rails/tree/master You can install it via the git clone command (if you have Git installed): git clone git://github.com/mghaught/yui4rails vendor/plugins/yui4rails Or hit the download button and extract the tarball as the archive command above illustrates. Next, you will want to run the rake command to install the YUI resources into your application. From the plugin root, run this command: rake yui4rails:update If you're running off trunk or a version newer than 0.1.1 then you can do this instead: rake yui4rails:update You should then find a lot of resources copied to the <RAILS_ROOT>/public/yui directory. At this time, the plugin assumes that you are referencing the YUI resources from your server, as opposed to theirs. We will make this optional in the future. At this point you can start to use the plugin in your application. Using =========== 1) Including YUI resources We have a convenience include helper for you to use in your templates <%= yui_includes %> You will want to feed this an array of component names (as symbols) such as: <%= yui_includes :datatable, :charts %> It will pull in the necessary javascript and stylesheet resources for those components. For the two components, you'll first want to read up on how to use them from YUI's developer site as they're not trivial widgets. Our wrappers on these objects are as follows: data_table = Yui4Rails::Widgets::DataTable.new("your_table_id", column_definitions, data_rows, footer_row = "") After constructing the component, you then need to render it via the render method: data_table.render Charts works essentially the same way: chart = Yui4Rails::Widgets::Chart.new("yui_chart_id", yui_column_definitions, yui_data_rows) chart.render You can usually find more tidbits on this plugin at Marty Haught's blog: http://martyhaught.com Copyright (c) 2008 Marty Haught, Andy Kappen, released under the MIT license







