Displaying 2 results from an estimated 2 matches for "contentscontroller".
Did you mean:
contentcontroller
2004 Dec 08
0
send file problem
Hi
I have problem with this function:
def download
begin File.readable?(path) -> true
File.file?(path) -> true
path = "/path/hej.pdf" send_file path
end
Log gives me
Processing ContentsController#download (for 192.168.0.6 at Tue Dec 07
23:05:17 CET 2004)
Parameters: {"action"=>"download", "id"=>"1", "controller"=>"contents"}
Completed in 0.000705 (1418 reqs/sec)
Streaming file /path/hej.pdf
Id will be used later so it j...
2010 Feb 23
11
Couldn't find without an ID
...;
<%= f.text_field :title %>
</p>
<p>
<%= f.label :verbiage %><br/>
<%= f.text_area :verbiage %><br/>
</p>
<%= f.submit "Update"%>
<% end %>
+++++++++++++++++++++++++++++++++++++
Here''s my controller code:
class ContentsController < ApplicationController
layout ''subpages''
def new
@content = Content.new
end
def create
@content = Content.new(params[:content])
@content.save
end
def edit
@content = Content.find(params[:id])
end
def update
@content = Content.find(par...