Hi All,

I'm pretty new to ROR.

I got 3 tables:

Team, with columns name, world_ranking, star_player and img_url
Result with columns round, score and team_name
Player with columns first_name, last_name, position and player_number

my models relationships look like this

class Team < ActiveRecord::Base
  attr_accessible :image_url, :name, :star_player, :world_ranking
  has_many :players
  has_many :results

class Result < ActiveRecord::Base
  attr_accessible :round, :score, :team_name
  belongs_to :team
  has_many :players

class Player < ActiveRecord::Base
  attr_accessible :first_name, :last_name, :position, :player_number, 
:team_name
  belongs_to :team
end

my default view is team#index and i have the option to show the team
what I want to achieve is to show the team details plus the team's players 
and results for the tournament (pretty much the content of the other 2 
tables) and am having an awful lot of trouble trying to render the info.
tried partials and a few methods but to no avail
Any ideas how can I go about this issue?

Thanking you in advance!

Jax


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/3Z0i72p-3AkJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to