AutoCommit Sam Aug 1 11:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-01 11:03:01 +02:00
parent d5571b38fa
commit a079a88dbc
4 changed files with 25 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
class CommentsController < ApplicationController
before_filter :decode_commentable_type
def index
@commentable=params[:commentable_type].constantize.find(params[:commentable_id]) unless params[:commentable_type].nil? or params[:commentable_id].nil?
num = {"Beispiel"=> 2, "Survey::Question"=> 7}
@@ -96,4 +97,9 @@ num = {"Beispiel"=> 2, "Survey::Question"=> 7}
format.js
end
end
private
def decode_commentable_type
params[:commentable_type].gsub("_","::")
end
end