Displaying 4 results from an estimated 4 matches for "has_valu".
Did you mean:
has_value
2006 Jun 20
4
Searching ActiveRecord sets
Hey all,
I''m learning AR and I''m trying to find the best way to search an
ActiveRecord set in order to make a conditional statement decision,
something like .has_value?(value) but for a multi-dimensional array like
an AR set of like 100 rows.
I know I can do something like this:
results = Table.find_by_sql("...")
for result in results
if result.has_value?("value")
do something...
end
end
But I''d rather not iterat...
2006 Mar 17
4
deleting from hash question
I''m a ruby newbie and have what is probably a relatively simple problem
I''m trying to solve. Say that I created a hash:
TASKS = {
"homework" => "Do Your Homework",
"chores" => "Your Have Chores",
"exercise" => "Don''t Forget to Exercise"
}
and then I had an Assignment model with:
def
2006 Nov 04
0
arrayfields-3.6.0
...- update
- replace
- invert
3.4.0:
- added FieldedArray[] ctor
- added methods to make Arrays with fields set behave more closely to Hashes
- each_pair
- each_key
- each_value
- fetch
- has_key?
- member?
- key?
- has_value?
- value?
- keys?
- store
- values
3.3.0:
- added gemspec file - thnx Assaph Mehr
- added FieldedArray proxy class which minimizes modifications to class
Array and allow ArrayFields to work (potientially) other arraylike object.
thnks Sean O&...
2006 Jan 24
0
Verbose traces (debugging question)
...place to start, but
considering that I ran a 2,000 line questionnaire through method
`self_eval'', it''s a red herring. The real problem is somewhere in that
questionnaire. In the end, it turned out that I misspelled ''or'' as ''pr''
(in method `has_value?'' within class Answers.) But you can see why I''d
be complaining about the level of detail.
Back in my perl days, I remember a module that would log the name of
each method executed in the course of an application''s run. You didn''t
want it on all the time b...