app/controllers/presentations_controller.rb in chili_presentations-0.1.0 vs app/controllers/presentations_controller.rb in chili_presentations-0.1.1
- old
+ new
@@ -26,11 +26,11 @@
if presentation.blank?
flash[:error] = "The requested presentation does not exist. Please verify the link or send the project owner a message."
redirect_to(project_presentations_path(@project))
end
- head :x_accel_redirect => presentation.path_to(params[:static_asset_path]), :content_type => requested_content_type
+ head :x_accel_redirect => presentation.x_accel_redirect_path_to(params[:static_asset_path]), :content_type => requested_content_type
end
def destroy
presentation && presentation.destroy
flash[:notice] = l(:presentation_deleted_message)
@@ -66,10 +66,10 @@
def presentation
@presentation ||= @project.presentations.find_by_cached_slug(params[:id])
end
def requested_content_type
- case presentation.path_to(params[:static_asset_path])
+ case presentation.x_accel_redirect_path_to(params[:static_asset_path])
when /\.css$/ then "text/css"
when /\.js$/ then "text/javascript"
else "text/html"
end
end