ruby on rails - why does heroku change the order of hashes? -
for life of me not figure out.
if have in local dev/production:
fields = { :name => { ...}, :description => { ...}, :amount => { .... } }
its fine loop through hashes , print fields name how declared it.
in heroku, sequence different in printed order?? have complete no idea why , can't clue why heroku printing them in different order.
does make sense?
edit: omg driving me nuts. in templat, sorting variable reaaaaaly weird reason, still coming out in manner heroku understands.
- @form_columns = @form_columns.sort_by |i| - if i[1][:rank].nil? - i[1][:rank] = rank - i[1][:rank] - rank = rank + 1
this how loop way:
- @form_columns.each |column_name|
please understand there no issue in local production/dev server.
if reason have use ruby 1.8 can ordered hash using orderedhash
in rails activesupport
.
to see stack using on heroku:
heroku stack
and migrate 1.9.2:
heroku stack:migrate bamboo-mri-1.9.2
Comments
Post a Comment