end
def create
- @my_model_class = self.class.model
+ set_model
@item = @my_model_class.new
@item.supply_default
@item.attributes = params[@item.item_name]
end
def update
- @my_model_class = self.class.model
+ set_model
@item = @my_model_class.edit(params[:id], @operators)
ot = @item.t
@item.attributes = params[@item.item_name]
set_model
@item = @my_model_class.edit(params[:id], @operators)
@binder = @my_model_class.binder_model.edit(@item.binder_id, @operators) if @item.binder_id
- render_destroy '/home/' + play_story_path(@item)
+ render_destroy play_story_path(@binder)
end
end