Merge branch 'develop' of http://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
19bb545993
|
@ -127,6 +127,7 @@ class BlogCommentsController < ApplicationController
|
|||
@blogComment.title = "RE: #{@article.title}" unless params[:blog_comment][:title]
|
||||
@article.children << @blogComment
|
||||
@article.save
|
||||
# @article.update_attribute(:updated_on, @blogComment.updated_on)
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
user_activity = UserActivity.where("act_type='BlogComment' and act_id =#{@article.id}").first
|
||||
if user_activity
|
||||
|
|
|
@ -55,7 +55,7 @@ class OrganizationsController < ApplicationController
|
|||
@organization.name = params[:organization][:name]
|
||||
@organization.description = params[:organization][:description]
|
||||
@organization.is_public = params[:organization][:is_public]
|
||||
@organization.allow_guest_download = params[:organization][:allow_guest_download] == 'on' ? 1 : 0
|
||||
@organization.allow_guest_download = params[:organization][:allow_guest_download] == '1' ? 1 : 0
|
||||
@organization.creator_id = User.current.id
|
||||
member = OrgMember.new(:user_id => User.current.id)
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ class BlogComment < ActiveRecord::Base
|
|||
|
||||
after_save :add_user_activity
|
||||
after_update :update_activity
|
||||
after_create :update_parent_time
|
||||
before_destroy :destroy_user_activity
|
||||
|
||||
scope :like, lambda {|arg|
|
||||
|
@ -64,6 +65,11 @@ class BlogComment < ActiveRecord::Base
|
|||
(user && user.logged? && (self.author == user) ) || user.admin?
|
||||
end
|
||||
|
||||
def update_parent_time
|
||||
if !self.parent.nil?
|
||||
self.root.update_attribute(:updated_on, self.updated_on)
|
||||
end
|
||||
end
|
||||
def project
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue