i am having a problem with a current piece of code, and it seems like the result for each on an array might be the culprit.
according to everything i have seen before, this should work:
a = [ "a", "b", "c" ] a.each {|x| print x, " -- " }
should produce:
a -- b -- c --
but i am getting:
a = [ "a", "b", "c" ]
=> ["a", "b", "c"]
a.each {|x| print x, " -- " }
a -- b -- c -- => ["a", "b", "c"]
does anyone know where the => ["a", "b", "c"] is coming from?
specifically, i am trying to run:
def self.show_pending_users self.find(:all, :conditions => "pending_role is not null").each {
x> "#{x.login}" }
end
where i expect to get a an array of x.login back.. but i am getting back an array of all the objects ...
any ideas?
thanks!