Re: [Rails] About the present method in rails, how to use?

2011-08-07 Thread Alejandro Cadavid
Hey First, be careful, the name of the method is actually present?, with the '?'. There is another method called blank?, what this last method does is asking if an object (or variable) is, let's say, in a 'black state', that is whether it is nil, empty or an empty string and returns true. So you

Re: [Rails] starter question about paperclip / relations in rails 3

2011-07-28 Thread Alejandro Cadavid
Hey When you do (user.assets.each do |assetfield|) you are getting each Asset object associated to user in the assetfield variable, but still you need to access the attachment property which is 'asset'. So basically you just need to change assetfield.url(:thumb) for assetfield.asset.url(:thumb)