Sha256: 102f769626a6c7950b675b3246f291df078c8524d7c855c262e157a150ee5cd5

Contents?: true

Size: 260 Bytes

Versions: 8

Compression:

Stored size: 260 Bytes

Contents

module Documentation
  class Screenshot < ActiveRecord::Base

    attachment :upload

    before_validation do
      if self.upload_file && self.alt_text.blank?
        self.alt_text = self.upload_file.original_filename 
      end
      true
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
documentation-1.0.9 app/models/documentation/screenshot.rb
documentation-1.0.8 app/models/documentation/screenshot.rb
documentation-1.0.7 app/models/documentation/screenshot.rb
documentation-1.0.6 app/models/documentation/screenshot.rb
documentation-1.0.5 app/models/documentation/screenshot.rb
documentation-1.0.4 app/models/documentation/screenshot.rb
documentation-1.0.3 app/models/documentation/screenshot.rb
documentation-1.0.2 app/models/documentation/screenshot.rb