My shoes pages look different depending on if I visit it with the visit
method or if I visit it from a link.  What am I doing wrong?

Here is how it looks when I visit via visit()
http://picasaweb.google.com/joshuacronemeyer/Cuberick?authkey=L_gyN3SijW8#5246656448379324066

Here is how it looks when I visit via a link
http://picasaweb.google.com/joshuacronemeyer/Cuberick?authkey=L_gyN3SijW8#5246656446687534866

See how the stack gets splatted? The Image gets into the middle of the
navigation and links are rendered ontop of one another.  I'm not sure what
I'm doing wrong.

Here is the code that calls visit with my url:
@submit.click do
  Score.add_high_score(@player_name.text, @game_name.text, @high_score.text)
  visit "/"
end

Here is the code that renders :index
  def index
    background "static/background.png"
    navigation
    content = stack(:margin => 4)
    Machine.find(:all).each do |machine|
      high_score_stack(machine, content)
    end
  end

  def navigation
    stack do
      banner "MonkeyFarm Arcade Classic", turq_centered
      image("static/kong.png", :margin_left => "45%")
      para link("Add a High Score", white_centered.with(:click,
"/newscore"))
      para link("View Dashboard", white_centered.with(:click, "/dashboard"))
      para link("Index", white_centered.with(:click, "/"))
    end
  end

  def high_score_stack(machine, target_stack)
    target_stack.append{para("#{machine.name} Top 5", :font => FONT, :stroke
=> red, :size => 20, :align => "center")}
    Score.top_five_scores_by_machine_id(machine.id).each do |score|
      target_stack.append do
          para "#{score.player.name} - #{score.score}", turq_centered
      end
    end
  end

Here is a link to the code in its entireity:
http://code.google.com/p/high-score/source/browse/trunk/high_score_app.rb if
you prefer to see things with syntax highlighting. :)

HUGE REGARDS!!!!!
josh

Reply via email to