Filenames in paperclip
===

Hey so I have a class called Asset and each Asset has an :attachment. I want to take the :basename.:extension of the uploaded file and store it in the :asset_file_name. How do I go about doing so? here is my class:


        class Asset < ActiveRecord::Base
        attr_accessible :asset_file_name, :lesson_id, :attachment

        #allows us to use :lesson_id in :url
        Paperclip.interpolates :lesson_id do |attachment, style|
        attachment.instance.lesson_id
        end

        has_attached_file :attachment,
        :url => "/attachments/:lesson_id/:basename.:extension",
        :path => ":rails_root/public/attachments/:lesson_id/:basename.:extension"

        validates_presence_of :asset_file_name
        validates_attachment_presence :attachment
  
        end