Displaying 1 result from an estimated 1 matches for "a_column_name".
2006 Feb 18
5
Model methods and partial view templates
...have a method in a controller that invokes a
render :partial => ''some_partial_view''
In that view, I''m trying to access a method defined in a model, like 
this;
<% for view in @an_array %>
  <% local_var = view.some_method() %>
  <% another_var = view.a_column_name %>
etc..
I am getting an undefined method error but the model is accessible 
because the variable ''another_var'' is accessed correctly. I have tried 
the following definitions in my ''View'' model;
def some_method()
...
end
def self.some_method()
...
end
I c...