But how can i init a big amount of attributes with empty strings.
I’d use nil as the marker for uninitialized. This happens to be the
default and saves the overhead of all the empty strings. You can deal
with those nils later, i.e. when changing or outputting them, e.g.
def modify_whatever(s)
(@whatever ||= “”) << s
end
def print_whatever
print @whatever || “”
end
You can even automate this by writing your own attr_accessor method that
will define getters like
The url has about 20 values but its not necessary every value has to be
filled.
So i want to update only these values from my “search form” wich have a
value and the rest with an empty string.