anton effendi wrote: > Thank you.. > Your ide must use 3 model.. 1 model -> User, 1 model -> for admin, 1 > model -> for user > is true? > But I want use 1 model for admin and user.. > so if I call "user = User.create" in admin and in user, photo will > upload.. with different size thumbnail. > > Can u explain with code?? thank you very much
class User < ActiveRecord::Base # Database table "users", having string field "type" # Put methods common to all users here end class OrdinaryUser < User has_attachment :thumbnails => ... end class Admin < User has_attachment :thumbnails => ... end user = OrdinaryUser.create! admin = Admin.create! -- Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

