whats wrong with this ruby hash?
Posted
by yaya3
on Stack Overflow
See other posts from Stack Overflow
or by yaya3
Published on 2010-06-18T13:08:46Z
Indexed on
2010/06/18
13:13 UTC
Read the original article
Hit count: 364
I'm pretty new to ruby, I keep getting the following error:
in gem_original_require': ./helpers/navigation.rb:28: odd number list for Hash (SyntaxError)
Any help appreciated...
module Sinatra::Navigation
def navigation
@navigation
nav = {
primary[0] = {
:title => "cheddar",
:active => false,
:children => {
{ :title => "cheese", :active => false },
{ :title => "ham", :active => false }
}
},
primary[1] = {
:title => "gorgonzola",
:active => false,
:children => {
{ :title => "What is the cheese?", :active => false },
{ :title => "What cheese", :active => false },
{ :title => "What does the cheese tell us?", :active => false, :children => {
{ :title => "Cheessus", :active => false },
{ :title => "The impact of different cheeses / characteristics for cheese in relation to CHSE outcomes", :active => false }
}
}
}
}
}
© Stack Overflow or respective owner