On 26.10.2008 16:54, Stephan M. wrote:
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.
(@whatever ||= “”) << s
print @whatever || “”
You can even automate this by writing your own attr_accessor method that
will define getters like
@foo || “”
And overwrite the empty string if the field of the form is filled with
Form, what form?
I try update_attributes(hash) with no success.
Can you be more specific about what you are really trying to do? Is
this web, UI or what?