Hello.
I have 2 model classes with different attributes:
class User < ActiveRecord::Base
end
class Subuser < User
end
When I call the 'new' function within controller:
def new
@subuser = Subuser.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @hosting }
end
end
and try to access data with view thats held by the Subuser model (migration):
<% form_for(@subuser) do |f| %>
<%= f.text_field :subname %>
<% end %>
I get:
undefined method `subname' for #
However, if I change it to some other cell that is defined under User model/migration, it will all work okay.
It seems like there are some isssues with the data access.
What am I doing wrong?
Thanks for help!
I get the following error