Skip to content

richardiux/restbox

Repository files navigation

To install as a Rails plugin:

script/plugin install http://github.com/richardiux/restbox.git

To install as a gem:

gem install restbox

Copy javascript, CSS, and images files to public

script/generate restbox

in your layout after including jQuery:

<%= javascript_include_tag 'restbox' %>
<%= stylesheet_link_tag 'restbox' %>
$(document).ready(function() {
  jQuery("a.restbox").restbox({})
}
<%= link_to "edit", order_path(@order), :class => "restbox" %>
def edit
  @order = Order.find params[:id]
  respond_to do |format|
    format.html { }
    format.js   { }
  end
end

You can use the following javascript helpers

To put text in the restbox:

<%= restbox(:content => 'some text') %>

To put a partial inside the restbox:

<%= restbox(:content => render(:partial => 'form')) %>

To put content in the restbox

$.restbox({content: "some text"})

To manually display loading restbox

$.restbox({})
JQuery 1.3.2
script/plugin install http://github.com/richardiux/restbox.git -f
script/generate restbox

If you have found a bug to report or a feature to request, please add it to the GitHub issue tracker if it is not there already.

github.com/richardiux/restbox/issues/

This project can be found on github at the following URL.

github.com/richardiux/restbox

  • 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 future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but

    bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright © 2009 Richard Millan & Joseph Silvashy. See LICENSE for details.

About

Simple restful ajax overlay to work with jQuery and Rails

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors