Skip to content

@akinsgre /controller.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Type error
def update
@channel = current_user.channels.find(params[:id])
# make sure channel isn't social
#render :text => '' and return if @channel.social
if params["channel"]["video_type"].blank? && !params["channel"]["video_id"].blank?
@channel.errors.add(:base, t(:channel_video_type_blank))
end
if @channel.errors.count <= 0
puts "########## Params #{params.inspect}"
@channel.save_tags(params[:tags][:name])
@channel.update_attributes(params[:channel])
else
session[:errors] = @channel.errors
redirect_to channel_path(@channel.id, :anchor => "channelsettings") and return
end
flash[:notice] = t(:channel_update_success)
redirect_to channel_path(@channel.id)
end
it "should allow a channel to be edited" do
@channel.public_flag = true
puts "###### tags = #{@tag} "
put :update, :id => @channel.id, :channel => @channel, :tags => @tag
response.should redirect_to channel_path(@channel.id)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.