Skip to content

Commit

Permalink
update seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb committed Dec 5, 2012
1 parent 36f7fb9 commit a9dbc7b
Show file tree
Hide file tree
Showing 7 changed files with 432 additions and 420 deletions.
4 changes: 3 additions & 1 deletion app/helpers/part_helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ def render_tip_score_v2( tip, opts={} )
show_tips = opts[:show_tips].present? ? opts[:show_tips] : true # default true show_tips = opts[:show_tips].present? ? opts[:show_tips] : true # default true
show_pts = opts[:show_pts].present? ? opts[:show_pts] : false # default false show_pts = opts[:show_pts].present? ? opts[:show_pts] : false # default false


## todo/fix: how to deal w/ missing tip - tip.nil?

render :partial => 'shared/td_tip_score_v2', render :partial => 'shared/td_tip_score_v2',
:locals => { :tip => tip, :locals => { :tip => tip,
:game => tip.game, :game => (tip.present? ? tip.game : nil),
:show_tips => show_tips, :show_tips => show_tips,
:show_pts => show_pts } :show_pts => show_pts }
end end
Expand Down
4 changes: 2 additions & 2 deletions app/views/plays/edit.html.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@







<!-- NB: namespaced model gets converted to sportsdb_models_play but only want user in params, thus, use as: option -->
<%= form_for @play, :url => play_path( @play ), :html => { :method => 'put' } do |f| %> <%= form_for @play, :as => :play, :url => play_path( @play ), :html => { :method => 'put' } do |f| %>




<!-- todo/fix: <!-- todo/fix:
Expand Down
4 changes: 2 additions & 2 deletions app/views/plays/index.html.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
<%= render_game_team1( game ) %> <%= render_game_team1( game ) %>
<% @users.each do |user| %> <% @users.each do |user| %>
<!-- fix: use _and_game! - to raise excep if find fails --> <!-- NB: allow missing tip, that is, tip.nil? true !!! -->
<% tip = Tip.find_by_user_and_pool_and_game( user, @pool, game ) %> <% tip = Tip.find_by_user_id_and_pool_id_and_game_id( user.id, @pool.id, game.id ) %>
<%= render_tip_score_v2( tip, :show_tips => @show_tips, :show_pts => @show_pts ) %> <%= render_tip_score_v2( tip, :show_tips => @show_tips, :show_pts => @show_pts ) %>
<% end %><!-- users.each --> <% end %><!-- users.each -->
Expand Down
3 changes: 2 additions & 1 deletion app/views/sessions/new.html.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@


<td><!-- begin 2nd column --> <td><!-- begin 2nd column -->


<%= form_for @user, :url => session_path() do |f| %> <!-- NB: namespaced model gets converted to sportsdb_models_user but only want user in params, thus, use as: option -->
<%= form_for @user, :as => :user, :url => session_path() do |f| %>


<div style='padding: 20px; background-color: #F1F1F1;'> <div style='padding: 20px; background-color: #F1F1F1;'>
<div> <div>
Expand Down
Loading

0 comments on commit a9dbc7b

Please sign in to comment.