Forum: Ruby on Rails Rake Task Selecting Text in a Field

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rake N. (Guest)
on 2009-01-05 13:02
Hi,

Everyone can help me on how to select a text in one Field, see the list
below;

table : tablename1
field : field1
data  : {:updated=>"2009-01-02", :created=>"2009-01-01", :price=>100.00}


inside may task:

tablename1.all.each { |tablename1|
        unless translations.flatten.any? {|t| t ==  tablename1.field1}
          puts "#{tablename1.field1}"
          unused += 1
        end
      }

I need only to display the data which are 2009-01-01 under :created=>,
and 100.00 under :price=>.


Thanks in Advance,
Ferdie
This topic is locked and can not be replied to.