<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>public/images/default_group.png</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -20,6 +20,8 @@ class Group &lt; ActiveRecord::Base
   validates_presence_of :name
   validates_presence_of :author
 
+  before_create :set_default_image
+
   file_column :image, :root_path =&gt; File.join(RAILS_ROOT, &quot;public/system/group_photos&quot;), :web_root =&gt; 'system/group_photos/', :magick =&gt; {
       :versions =&gt; {
         :big    =&gt; {:crop =&gt; &quot;1:1&quot;, :size =&gt; Tog::Config[&quot;plugins.tog_social.group.image.versions.big&quot;],    :name =&gt; &quot;big&quot;},
@@ -31,8 +33,8 @@ class Group &lt; ActiveRecord::Base
 
   record_activity_of :user
   acts_as_abusable
-  acts_as_taggable      
-  seo_urls      
+  acts_as_taggable
+  seo_urls
 
   acts_as_state_machine :initial =&gt; :pending
   state :pending, :enter =&gt; :make_activation_code
@@ -101,4 +103,13 @@ class Group &lt; ActiveRecord::Base
     self.moderator_memberships.each{|mod| mod.activate!}
   end
 
+  def set_default_image
+    unless self.image
+      if Tog::Config[&quot;plugins.tog_social.group.image.default&quot;]
+        default_group_image = File.join(RAILS_ROOT, 'public', 'tog_social', 'images', Tog::Config[&quot;plugins.tog_social.group.image.default&quot;])
+        self.image = File.new(default_group_image)
+      end
+    end
+  end
+
 end</diff>
      <filename>app/models/group.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dd1bbe925cb6992a4f5c856afa7af76bedd392db</id>
    </parent>
  </parents>
  <author>
    <name>Roberto Salicio</name>
    <email>roberto.salicio@gmail.com</email>
  </author>
  <url>http://github.com/tog/tog_social/commit/b5b84a040135d3c6f8496f4452f1a4974eb5d124</url>
  <id>b5b84a040135d3c6f8496f4452f1a4974eb5d124</id>
  <committed-date>2008-09-23T09:26:50-07:00</committed-date>
  <authored-date>2008-09-23T09:26:50-07:00</authored-date>
  <message>set default group image</message>
  <tree>07b14ce64571265da97441eb11562f7ca3e5e4e6</tree>
  <committer>
    <name>Roberto Salicio</name>
    <email>roberto.salicio@gmail.com</email>
  </committer>
</commit>
