Permalink
Browse files

add load fixtures from string

  • Loading branch information...
1 parent 97182a4 commit a81af33623f38f083a7304c4d4c30e3497a62dc2 @geraldb geraldb committed Dec 12, 2012
View
@@ -6,7 +6,7 @@ gem 'kramdown' # all ruby markdown processor/engine
gem 'rails', '3.2.1'
gem 'rails-i18n' # see https://github.com/svenfuchs/rails-i18n
-gem 'sportdb', '0.9.2' # see https://github.com/geraldb/sport.db.ruby
+gem 'sportdb', '0.9.5' # see https://github.com/geraldb/sport.db.ruby
gem 'sportdb-market', '0.3.0' # see https://github.com/geraldb/sport.db.ruby-market
gem 'sportdb-play', '0.2.0' # see https://github.com/geraldb/sport.db-play
View
@@ -97,9 +97,9 @@ GEM
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
- sportdb (0.9.2)
+ sportdb (0.9.5)
activerecord (~> 3.2)
- worlddb (~> 0.5.0)
+ worlddb (~> 0.6.8)
sportdb-market (0.3.0)
sportdb-play (0.2.0)
sprockets (2.1.2)
@@ -121,7 +121,7 @@ GEM
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
- worlddb (0.5.0)
+ worlddb (0.6.8)
activerecord (~> 3.2)
PLATFORMS
@@ -140,7 +140,7 @@ DEPENDENCIES
rails-i18n
ri_cal
sass-rails (~> 3.2.3)
- sportdb (= 0.9.2)
+ sportdb (= 0.9.5)
sportdb-market (= 0.3.0)
sportdb-play (= 0.2.0)
sqlite3
@@ -7,8 +7,12 @@ def index
def create
event = Event.find( params[:event_id] )
- text = params[:text]
- render :text => "hello fixtures for event #{event.key} >>#{text}<<"
+ text = params[:text]
+
+ reader = SportDB::Reader.new
+ reader.load_fixtures_from_string( event.key, text )
+
+ render :text => "done; hello fixtures for event #{event.key} >>#{text}<<"
end
end
@@ -5,7 +5,7 @@
<%= form_tag do %>
<div>
- <%= text_area_tag 'text', '', :rows => 16, :cols => 100 %>
+ <%= text_area_tag 'text', '', :rows => 16, :cols => 80 %>
</div>
<div>
Event:
@@ -5,9 +5,11 @@
<%= form_tag do %>
<div>
- <%= text_area_tag 'text', '', :rows => 16, :cols => 100 %>
+ <%= text_area_tag 'text', '', :rows => 16, :cols => 80 %>
</div>
<div>
+ Service:
+ TBD - add select tag
Event:
<%= select_tag :event_id, options_from_collection_for_select(Event.all, :id, :full_title) %>
@@ -45,7 +45,7 @@
<%= link_to 'Pools', admin_pools_path() %> &bull;
<%= link_to 'Bonus', admin_bonus_path() %> &bull;
<%= link_to 'Jobs', jobs_path() %>
- | New (Upcoming, Not Yet Done):
+ | New:
<%= link_to 'Fixtures', admin_fixtures_path() %> &bull;
<%= link_to 'Quotes', admin_quotes_path() %>
<!-- todo: add some more links -->
Oops, something went wrong.

0 comments on commit a81af33

Please sign in to comment.