Hi,
I'm trying to modify an AR model's foo attribute before reading into the model's edit form. I've tried the following:
class Model def foo "the foo attribute is " + read_attribute(:foo) end end
If I use a form_for on the edit view with the following code, I get the plain database value inside the text field and the AR value next to it:
<% form_for(@model) do |f| %> <%= f.text_field, :foo %> <%= @model.foo %> <% end %>
It seems like they should show the same value but they don't. What am I missing?
Thanks, Harry