h.each_key.collect {|k| k if k.to_s.include?('school') }

irb(main):007:0> h = {:school_name => 'RoR School', :school_address => 'RoR
Street'}
=> {:school_name=>"RoR School", :school_address=>"RoR Street"}
irb(main):008:0> h.each_key.collect {|k| k if k.to_s.include?('school') }
=> [:school_name, :school_address]
irb(main):009:0>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to