This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LinkBar | |
def initialize | |
@bars = Hash.new | |
end | |
def register(linkbar_name, links) | |
@bars[linkbar_name] ||= [] | |
@bars[linkbar_name].concat links | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is the form tag I normally have to do | |
<% #form_for game_player,:url => game_player_path(params[:slug], game_player) do |f| %> | |
#This is what I was trying | |
# This form submits to http://localhost:3000/game_players/update_all, I need the team slug in front | |
<% form_tag (:controller => "game_players", :action => "update_all") do %> | |
<% for game_player in @game_players %> | |
<% fields_for "game_player_#{game_player.id}" do |f| %> | |
<%= f.error_messages %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionController::Routing::Routes.draw do |map| | |
map.resources :fans | |
map.resources :league_players | |
map.logout '/logout', :controller => 'sessions', :action => 'destroy' | |
map.login '/login', :controller => 'sessions', :action => 'new' | |
map.check '/check', :controller => 'sessions', :action => 'create' | |
NewerOlder