Topic: Help - I'm stuck
Help me someone! Argh!
I want to be able to store a hash in the database.
Say I have a Form. It has lotsa lines numbered #1, 2, ..., n
Now, I want to be able to access these fields in the view like so:
And in the controller:
lines = lines + lines
How should I declare them in the model?
I tried, in my model Form.rb:
self.local_lines ||= Hash.new
self.local_lines = lines
And in my view I try to access it:
<%= @form.local_lines %>
but I get this error:
wrong number of arguments (0 for 1)
Now, I MIGHT be doing something wrong, so don't blame Rails.