Skip to content

Instantly share code, notes, and snippets.

@riklomas
Created February 4, 2013 21:18

Revisions

  1. riklomas revised this gist Feb 4, 2013. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    def profile_image=(file_data)
    unless file_data.blank?
    unless file_data.blank?
    @file_data = file_data.read

    e = file_data.original_filename.split(".").last.downcase
    self.profile_image_file = e
    end
  2. riklomas created this gist Feb 4, 2013.
    8 changes: 8 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    def profile_image=(file_data)
    unless file_data.blank?
    @file_data = file_data.read

    e = file_data.original_filename.split(".").last.downcase
    self.profile_image_file = e
    end
    end