I have a users model being automatically generated by hobo and i created a new resource called "Product". Im trying a simple application like inventory management .
The association im using
class Product < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
item :name
timestamps
end
belongs_to :user, :class_name => "User", :creator => true
def create_permitted?
acting_user.signed_up?
end
def update_permitted?
acting_user.signed_up?
end
def destroy_permitted?
acting_user.signed_up?
end
def view_permitted?(field)
acting_user.signed_up?
end
and for user
class User < ActiveRecord::Base
hobo_user_model # Don't put anything above this
fields do
name :string, :required, :unique
address :string
email_address :email_address, :login => true
administrator :boolean, :default => false
timestamps
end
children :products
has_many :products, :dependent => :destroy
After i start the application. I logged into testuser1 and tried to create a new product. and im getting a drop down list with <testuser1> <testuser2> <testuser3> with <testuser1> selected .
Can i skip this dropdown from model and not with <fields-list skip="user">
Thanks
Vivek