> def create
> @s=Sollu.new
> @s.save
> afile=File.open("network.txt",'w')
> afile.write(@s.input)
> afile.close
> redirect_to sollus_path
> end
> But after I enter the values from the the browser, nothing gets saved in the
> file "network.txt".
No kidding. Where above do you imagine that `@s.input` is magically
acquiring a value?
You should run through a basic Rails tutorial on using forms...
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Also have a look at the Rails Guide on Debugging. That will show you
how to use ruby-debug to break into your code and inspect data and
follow the flow. Then you can break in before afile.write(@s.input)
and you would see whether @s.input has any content.
Colin
railstutorial.org covers most basic features of Rails and is free to
use online. Make sure that any tutorial you use is for the version of
Rails that you are using.
Colin