README.rdoc in restbox-0.0.1 vs README.rdoc in restbox-0.1.0

- old
+ new

@@ -1,45 +1,67 @@ = Restbox -== Prerequisites - JQuery 1.3.2 - == Install To install as a Rails plugin, run this command. script/plugin install http://github.com/richardiux/restbox.git +=== Prerequisites + JQuery 1.3.2 + == Setup in your layout after including jQuery: <%= javascript_include_tag 'restbox' %> <%= stylesheet_link_tag 'restbox' %> -== Example +== Example on Rails Application +=== In your application.js + + $(document).ready(function() { + jQuery("a.restbox").restbox({}) + } + === In your view -link_to "edit", order_path(@order), :class => "restbox" + <%= link_to "edit", order_path(@order), :class => "restbox" %> + +=== In your controller + def edit + @order = Order.find params[:id] + respond_to do |format| + format.html { } + format.js { } + end + end + +=== The JS view for the action (edit.js.erb) + +You can use the following javascript helpers + To put text in the restbox: - <%= restbox({:content => "some text"})%> + <%= restbox(:content => 'some text') %> To put a partial inside the restbox: - <%= restbox(:content => render(:partial => 'orders')) %> + <%= restbox(:content => render(:partial => 'form')) %> -=== With javascript +== With javascript + To put content in the restbox $.restbox({content: "some text"}) To manually display loading restbox $.restbox({}) == Upgrading + === Reinstall the plugin script/plugin install http://github.com/richardiux/restbox.git -f === Regenerate JS and CSS cd vendor/plugins/restbox/; ruby install.rb @@ -54,12 +76,10 @@ This project can be found on github at the following URL. http://github.com/richardiux/restbox -Description goes here. - == Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a @@ -69,6 +89,6 @@ bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. == Copyright -Copyright (c) 2009 Richard Millan. See LICENSE for details. +Copyright (c) 2009 Richard Millan & Joseph Silvashy. See LICENSE for details.