Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using integer as a Key ti gives error. #54

Open
ranjithnalimela opened this issue Jun 29, 2013 · 1 comment
Open

When using integer as a Key ti gives error. #54

ranjithnalimela opened this issue Jun 29, 2013 · 1 comment

Comments

@ranjithnalimela
Copy link

Hi,
This is ranjith, in my yml file i have some key as integer like

yml

3d_max:
:summary:
:total: 0
:cities:
:hyderabad:
:summary:
:latitude: 17.347139358520508
:longitude: 78.42813110351562

and i configure my settinglogic.rb in config/initialize like

settinglogic.rb

class DeveloperSkillLocations < Settingslogic
source "#{YML_PATH}/developers_map.yml"
load!
end

when i start my rails server it gives follwing error

/home/ranjith/.rvm/gems/ruby-1.9.3-p429/gems/settingslogic-2.0.9/lib/settingslogic.rb:154:in instance_variable_set':@3d_max' is not allowed as an instance variable name (NameError)

Thanks...

@cveneziani
Copy link

Hi Ranjith,

One of my workarounds is to prefix this kind of key with a underscore (eg. _3d_max:)

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants