SHARE
TWEET

Untitled

a guest Jun 19th, 2017 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require 'application'
  2. #require 'user'
  3.  
  4. module LocalAvatarsPlugin
  5.   module UsersAvatarPatch
  6.     def self.included(base) # :nodoc:
  7.       base.class_eval do
  8.         unloadable
  9.                         has_many :attachments, {:as => :container,
  10.                                                                                                                         :order => "#{Attachment.table_name}.created_on",
  11.                                                                                                                         :dependent => :destroy}
  12.       end
  13.     end
  14.   end
  15. end
  16. User.send(:include, LocalAvatarsPlugin::UsersAvatarPatch)
RAW Paste Data
Top