app/controllers/muck/activities_controller.rb in muck-activities-0.1.7 vs app/controllers/muck/activities_controller.rb in muck-activities-0.1.8
- old
+ new
@@ -4,11 +4,11 @@
include ApplicationHelper
include MuckActivityHelper
before_filter :login_required
before_filter :find_parent, :only => [:index, :create]
- before_filter :get_activity, :only => [:destroy]
+ before_filter :get_activity, :only => [:destroy, :comment_html]
def index
if @parent.can_view?(current_user)
@activities = get_activities(@parent)
respond_to do |format|
@@ -128,10 +128,10 @@
end
def get_activity_html(activity)
render_to_string(:partial => "activity_templates/#{activity.template}", :locals => { :activity => activity })
end
-
+
def find_parent
@klass = params[:parent_type].to_s.capitalize.constantize
@parent = @klass.find(params[:parent_id])
end
\ No newline at end of file