Commit 46d2693e
Changed files (2)
app
controllers
models
app/controllers/creations_controller.rb
@@ -27,15 +27,11 @@ class CreationsController < ApplicationController
@creation.category_ids = params[:creation][:category_ids] ||= []
if @creation.save
- #redirect_to( '/creations/crop/' + @creation.id.to_s )
redirect_to(@creation, :notice => 'Creation was successfully cropped.')
else
flash[:error] = @creation.errors.full_messages
render :action => "new"
end
-
- #current_user.add_creation(params[:creation])
- #redirect_to(creations_url)
end
# PUT /creations/1
app/models/user.rb
@@ -32,13 +32,6 @@ class User < ActiveRecord::Base
Comment.create_for(self, creation, comment)
end
- #def add_creation(params)
- #@creation = creations.create(params)
- #@creation.category_ids = params[:category_ids] ||= []
- #@creation.save!
- #@creation
- #end
-
def to_param
"#{id}-#{name.gsub(/[^a-z0-9]+/i, '-')}"
end