Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 1.88 KB

File metadata and controls

65 lines (40 loc) · 1.88 KB

Rails3 Template

pct's rails3 template, modified from ihower's and other resources.

Usage:

Template for frontend only:

$ rails new YourAppName -m https://raw.github.com/pct/rails3-template/master/frontend.rb

Template for backend only:

$ rails new YourAppName -m https://raw.github.com/pct/rails3-template/master/backend.rb

and the scaffold command::

$ rails g scaffold post title:string content:text
$ rake db:migrate

Full Template (frontend and backend in one site domain):

$ rails new YourAppName -m https://raw.github.com/pct/rails3-template/master/full.rb

and the scaffold command::

$ rails g scaffold backend/post title:string content:text
$ rake db:migrate

** The bad smell is all your MVC file must use backend prefix **

Backend Screenshots

(rails new MyBlog -m https://raw.github.com/pct/rails3-template/master/full.rb)

frontend: /

frontend

login page: /admins/sign_in

login

backend page: /backend

backend

scaffold list: /backend/posts

list

search results:

search result

scaffold view: /backend/posts/1

view

TODO:

  1. admin add cancan
  2. admin add CRUD log
  3. admin change email and password

Reference

  1. https://github.com/gabetax/twitter-bootstrap-kaminari-views
  2. https://github.com/ihower/rails3-app-template
  3. http://twitter.github.com/bootstrap/
  4. https://github.com/plataformatec/devise
  5. https://github.com/ernie/ransack