Yong Gu wrote:
> I think use *render :file => 'uploadfile.html.erb'*, as rails would look
> for
> the template in your view directory, which is "app/views",
>
> and if you use render :file => 'controller/uploadfile.html.erb', it will
> look for the template in "app/views/controller/uploadfile.html.erb", or
> rails always
>
> assume you have already put your template in the controller's according
> view
> folder
wheen i did that i am getting the error like this
hiiiiiiiiiii3
SQL (0.5ms) SET client_min_messages TO 'panic'
SQL (0.5ms) SET client_min_messages TO 'notice'
SQL (0.6ms) SET client_encoding TO 'unicode'
Processing UploadController#uploadFile (for 127.0.0.1 at 2010-03-29
11:47:28) [POST]
Parameters: {"commit"=>"Upload",
"authenticity_token"=>"g1vUQZ7QAh7FjfusjbJuh7EBO4UVVFInaYsxzCMK91I=",
"date_file"=>{"upload"=>#<File:/tmp/RackMultipart.3648.0>}}
NoMethodError (You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]):
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.