Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
embeddedjs with ruby
JavaScript Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
demo
temlpates
Gemfile
Readme.markdown
ejs.js
jerb.js
test.rb

Readme.markdown

EJSRB

There are two reasons to use EJSRB:

  1. Re-use your views on the server and in the browser, without learning a new language or giving up SEO.
  2. Perfect separation between your controller and your view.

Re-use

Do your actions respond to ajax requests with html? What if you need to call the same action from different pages, and want to format the results differently? What if you want to optimistically update the UI without waiting for an AJAX response? What if you want to enable your application offline?

Here's stuff I've tried: duplicating views - 2x the pain, there are always regressions and forgetting to update the stuff in two places. copying an existing element and replacing the content - brittle, more work than duplicating views adding flags to the xhr,

Install

sudo gem update --system sudo gem install bundler git clone git://github.com/aaronblohowiak/ejsrb.git cd ejsrb sudo bundler install

Something went wrong with that request. Please try again.