Permalink
Browse files

use admin module

  • Loading branch information...
geraldb committed May 22, 2012
1 parent 9389b87 commit d994a22272c13700d1e4cfabf0d94d01ec02768a
Showing with 310 additions and 273 deletions.
  1. +34 −0 NOTES.markdown
  2. +14 −21 README.markdown
  3. +1 −1 app/controllers/{ → admin}/events_controller.rb
  4. +1 −1 app/controllers/{ → admin}/games_controller.rb
  5. +1 −1 app/controllers/{ → admin}/imports_controller.rb
  6. +1 −1 app/controllers/{ → admin}/jobs_controller.rb
  7. +1 −1 app/controllers/{ → admin}/rounds_controller.rb
  8. +1 −1 app/controllers/{ → admin}/teams_controller.rb
  9. +1 −1 app/controllers/{ → admin}/update_controller.rb
  10. +1 −1 app/controllers/{ → admin}/users_controller.rb
  11. 0 app/views/{ → admin}/events/_form.html.erb
  12. 0 app/views/{ → admin}/events/edit.html.erb
  13. 0 app/views/{ → admin}/events/index.html.erb
  14. 0 app/views/{ → admin}/events/new.html.erb
  15. 0 app/views/{ → admin}/games/_form.html.erb
  16. 0 app/views/{ → admin}/games/edit.html.erb
  17. 0 app/views/{ → admin}/games/index.html.erb
  18. 0 app/views/{ → admin}/games/new.html.erb
  19. 0 app/views/{ → admin}/jobs/index.html.erb
  20. 0 app/views/{ → admin}/rounds/_form.html.erb
  21. 0 app/views/{ → admin}/rounds/edit.html.erb
  22. 0 app/views/{ → admin}/rounds/index.html.erb
  23. 0 app/views/{ → admin}/rounds/new.html.erb
  24. 0 app/views/{ → admin}/teams/_form.html.erb
  25. 0 app/views/{ → admin}/teams/edit.html.erb
  26. 0 app/views/{ → admin}/teams/index.html.erb
  27. 0 app/views/{ → admin}/teams/new.html.erb
  28. 0 app/views/{ → admin}/update/_game.html.erb
  29. 0 app/views/{ → admin}/update/index.html.erb
  30. 0 app/views/{ → admin}/users/_form.html.erb
  31. 0 app/views/{ → admin}/users/edit.html.erb
  32. 0 app/views/{ → admin}/users/index.html.erb
  33. 0 app/views/{ → admin}/users/new.html.erb
  34. 0 app/views/{ → admin}/users/show.html.erb
  35. +33 −23 config/routes.rb
  36. +221 −221 db/schema.rb
View
@@ -0,0 +1,34 @@
+# Wettpool Dev Tips
+
+
+## Tips for Ruby Version Manager
+
+Use Ruby 1.9+ (required by Rails 3.2+)
+
+ rvm use 1.9.3
+
+## Tips for Bundler
+
+Setup without production env (needs PostgreSQL)
+
+ bundle install --without production
+
+## Tips for Annotate
+
+Annotate models via
+
+ bundle exec annotate --position before
+
+## Tips for Heroku
+
+Drop and recreate DB on later uploads via
+
+ heroku pg:reset SHARED_DATABASE --confirm wettpool
+ heroku run rake db:migrate db:seed
+ heroku restart
+
+Debugging. Get latest logs via
+
+ heroku logs
+
+
View
@@ -1,26 +1,24 @@
# Wettpool
-Tippspiel für Euro 2012, Champions League 2012, ÖFB Cup 2012 etc.
+Free, Open Source Sports Betting Pool (Euro 2012, Champions League 2012, ÖFB Cup 2012, etc.)
+in Ruby on Rails (Version 3.2 and up).
-## Tips for Ruby Version Manager
+## Demo
-Use Ruby 1.9+ (required by Rails 3.2+)
+Try the demo install running on Heroku [wettpool.herokuapp.com](http://wettpool.herokuapp.com).
- rvm use 1.9.3
+Use the login credentials demo/demo.
-## Tips for Bundler
-Setup without production env (needs PostgreSQL)
+## Setup on Heroku
- bundle install --without production
+Clone the Wettpool git repo
-## Tips for Annotate
+ git clone ???
+
+Create app on Heroku e.g.
-Annotate models via
-
- bundle exec annotate --position before
-
-## Tips for Heroku
+ heroku create <your_app_name_here> --cedar ???
Upload via
@@ -30,16 +28,11 @@ Create DB on first upload via
heroku run rake db:migrate db:seed
-Drop and recreate DB on later uploads via
-
- heroku pg:reset SHARED_DATABASE --confirm wettpool
- heroku run rake db:migrate db:seed
- heroku restart
-
-Debugging. Get latest logs via
+or all-in-one alternative
- heroku logs
+ heroku run rake db:setup
+That's it.
## License
@@ -1,6 +1,6 @@
# encoding: utf-8
-class EventsController < ApplicationController
+class Admin::EventsController < ApplicationController
# GET /events
def index
@@ -1,4 +1,4 @@
-class GamesController < ApplicationController
+class Admin::GamesController < ApplicationController
# GET /games
def index
@@ -1,4 +1,4 @@
-class ImportsController < ApplicationController
+class Admin::ImportsController < ApplicationController
# POST /import
def create
@@ -1,6 +1,6 @@
# encoding: utf-8
-class JobsController < ApplicationController
+class Admin::JobsController < ApplicationController
def index
@@ -1,4 +1,4 @@
-class RoundsController < ApplicationController
+class Admin::RoundsController < ApplicationController
# GET /rounds
def index
@@ -1,4 +1,4 @@
-class TeamsController < ApplicationController
+class Admin::TeamsController < ApplicationController
# GET /teams
def index
@@ -1,6 +1,6 @@
# encoding: utf-8
-class UpdateController < ApplicationController
+class Admin::UpdateController < ApplicationController
def index
limit = params[:limit] || '30'
@@ -1,4 +1,4 @@
-class UsersController < ApplicationController
+class Admin::UsersController < ApplicationController
# GET /users
def index
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -9,10 +9,7 @@
match 'live', :to => 'live#index'
match 'live/:game_id', :to => 'live#show', :as => :live_game
-
- match 'update', :to => 'update#index'
- match 'update/update', :to => 'update#update' # , :via => :get
-
+
match 'time', :to => 'time#index'
match 'ical/:play_id', :to => 'ical#index'
@@ -21,30 +18,43 @@
resource :password, :only => [:new, :create, :destroy]
- resources :jobs do
- get 'calc', :on => :collection
- get 'export', :on => :collection
- get 'keys', :on => :collection
- get 'wipe_out_time', :on => :collection
- get 'wipe_out', :on => :collection
- end
-
- resource :import, :only => [:create]
-
- resources :users
- resources :rounds
- resources :games
- resources :teams
- resources :plays
-
- resources :events do
- post 'add_team_to', :on => :member
- end
+ resources :plays
resources :pools do
get 'add_player_to', :on => :member
resources :players, :only => [:show, :edit]
end
+ ##############################
+ ## routes for admin
+
+ scope :module => 'admin' do
+
+ match 'update', :to => 'update#index'
+ match 'update/update', :to => 'update#update' # , :via => :get
+
+ resources :jobs do
+ get 'calc', :on => :collection
+ get 'export', :on => :collection
+ get 'keys', :on => :collection
+ get 'wipe_out_time', :on => :collection
+ get 'wipe_out', :on => :collection
+ end
+
+ resource :import, :only => [:create]
+
+ resources :users
+ resources :rounds
+ resources :games
+ resources :teams
+
+ resources :events do
+ post 'add_team_to', :on => :member
+ end
+ end
+
+ #######################
+ ## home route
+
root :to => 'pages#home'
end
Oops, something went wrong.

0 comments on commit d994a22

Please sign in to comment.