UNPKG

1.06 kBMarkdownView Raw
1# Another Example: Batman Classifieds
2
3Find the source here: http://github.com/Shopify/batman-classifieds
4
5Find the demo here: http://batman-classifieds.heroku.com
6
7# Running the demo yourself
8
9This is a elementary but not trivial Rails 3.1 app. To run it locally, you need a Ruby installation and the bundler gem installed. To install:
10
11 git clone https://github.com/Shopify/batman-classifieds.git
12 cd batman-classifieds
13 bundle install
14 bundle exec rake db:setup
15 bundle exec rails server
16
17And the app should be available at http://localhost:3000/.
18
19# About the app
20
21Batman Classifieds is a good example of a simple Batman application and how to best integrate batman with Rails. It uses the `batman-rails` gem
22to source batman's javascripts, and Sprockets to package it all up. There's two major resources: Ads, and Users, which are exposed via JSON endpoints
23and accessed using a `Batman.RailsStorage` adapter. Ads are a typical CRUD resource, whereas Users are session based and exposed via the
24`ApplicationController` talking to OmniAuth.