Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
move db to sport.db.admin-market
  • Loading branch information
geraldb committed Nov 17, 2012
1 parent 896d33c commit 0fdcf65
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 335 deletions.
8 changes: 0 additions & 8 deletions app/controllers/db/base_controller.rb

This file was deleted.

15 changes: 0 additions & 15 deletions app/controllers/db/events_controller.rb

This file was deleted.

22 changes: 0 additions & 22 deletions app/controllers/db/games_controller.rb

This file was deleted.

13 changes: 0 additions & 13 deletions app/controllers/db/teams_controller.rb

This file was deleted.

4 changes: 3 additions & 1 deletion app/helpers/application_helper.rb
Expand Up @@ -6,7 +6,9 @@ def powered_by
## todo/fix: use version from wettpool module ## todo/fix: use version from wettpool module
content_tag :div do content_tag :div do
link_to( 'Sportbook/1', 'https://github.com/geraldb/sportbook' ) + ', ' + link_to( 'Sportbook/1', 'https://github.com/geraldb/sportbook' ) + ', ' +
link_to( "sport.db/#{SportDB::VERSION}", 'https://github.com/geraldb/sport.db' ) + ' - ' + link_to( "sport.db/#{SportDB::VERSION}", 'https://github.com/geraldb/sport.db' ) + ', ' +
link_to( "sport.db-market/#{SportDB::Market::VERSION}", 'https://github.com/geraldb/sport.db-market' ) + ', ' +
link_to( "world.db/#{WorldDB::VERSION}", 'https://github.com/geraldb/world.db' ) + ' - ' +
content_tag( :span, "Ruby/#{RUBY_VERSION} (#{RUBY_RELEASE_DATE}/#{RUBY_PLATFORM}) on") + ' ' + content_tag( :span, "Ruby/#{RUBY_VERSION} (#{RUBY_RELEASE_DATE}/#{RUBY_PLATFORM}) on") + ' ' +
content_tag( :span, "Rails/#{Rails.version} (#{Rails.env})" ) content_tag( :span, "Rails/#{Rails.version} (#{Rails.env})" )
## content_tag( :span, "#{request.headers['SERVER_SOFTWARE'] || request.headers['SERVER']}" ) ## content_tag( :span, "#{request.headers['SERVER_SOFTWARE'] || request.headers['SERVER']}" )
Expand Down
15 changes: 3 additions & 12 deletions app/models/game.rb
Expand Up @@ -35,6 +35,9 @@ module SportDB::Models


class Game class Game


has_many :tips


after_save :log_action after_save :log_action


def job_running! def job_running!
Expand All @@ -49,18 +52,6 @@ def job_running?
(@job_running ||= false) == true (@job_running ||= false) == true
end end



def over? # game over?
play_at <= Time.now
end

def knockout?
knockout == true
end

def complete?
score1.present? && score2.present?
end


def score_str def score_str
if score5.present? && score6.present? # im Elfmeterschiessen i.E.? if score5.present? && score6.present? # im Elfmeterschiessen i.E.?
Expand Down
2 changes: 1 addition & 1 deletion app/models/tip.rb
Expand Up @@ -27,7 +27,7 @@ class Tip < ActiveRecord::Base


belongs_to :user belongs_to :user
belongs_to :pool belongs_to :pool
belongs_to :game belongs_to :game, :class_name => 'SportDB::Models::Game'


before_save :calc_toto12x before_save :calc_toto12x
after_save :log_action after_save :log_action
Expand Down
12 changes: 0 additions & 12 deletions app/views/db/events/index.html.erb

This file was deleted.

45 changes: 0 additions & 45 deletions app/views/db/events/show.html.erb

This file was deleted.

37 changes: 0 additions & 37 deletions app/views/db/games/_games.html.erb

This file was deleted.

22 changes: 0 additions & 22 deletions app/views/db/games/index.html.erb

This file was deleted.

17 changes: 0 additions & 17 deletions app/views/db/teams/index.html.erb

This file was deleted.

51 changes: 0 additions & 51 deletions app/views/db/teams/show.html.erb

This file was deleted.

63 changes: 0 additions & 63 deletions app/views/layouts/db.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion config/locales/de.yml
@@ -1,7 +1,7 @@
de: de:
signin: "Anmelden" signin: "Anmelden"
signout: "Abmelden" signout: "Abmelden"
upcoming_games: "Nächsten Spiele" upcoming_games: "Nächste Spiele"
past_games: "Vergangene Spiele" past_games: "Vergangene Spiele"
more_games: "Mehr Spiele" more_games: "Mehr Spiele"
welcome: "Willkommen" welcome: "Willkommen"
Expand Down
13 changes: 0 additions & 13 deletions config/routes.rb
Expand Up @@ -65,19 +65,6 @@
resources :users resources :users
end end


##############################
## routes for db

match 'db', :to => 'db/games#index'

namespace :db do
resources :events
resources :teams
resources :games do
get 'past', :on => :collection
end
end

############################## ##############################
## routes for setup via module (setup not in url -- todo/fix??) ## routes for setup via module (setup not in url -- todo/fix??)


Expand Down

0 comments on commit 0fdcf65

Please sign in to comment.