Re: [Rails] save query string parameter value to database

2011-05-07 Thread Max Schubert
Your code example shows params[:fn] Your example URL has fname=cv On 5/7/11, farhad mahmoodi wrote: > I generate a controller and call create model method with parameter: > > > def add_item > Pers1.create(:fname => params[:fn], :lname => params[:ln]) > render :text => "Success!" >

Re: [Rails] save query string parameter value to database

2011-05-07 Thread Colin Law
On 7 May 2011 12:17, farhad mahmoodi wrote: > hi, > > I search google for this question but i did not find any solution for > that. > > I want to save parameter value to database. this parameter send by url. > > for example: > http://simple-beach-416.heroku.com/code/restserver?fname=cv > > I want

[Rails] save query string parameter value to database

2011-05-07 Thread farhad mahmoodi
hi, I search google for this question but i did not find any solution for that. I want to save parameter value to database. this parameter send by url. for example: http://simple-beach-416.heroku.com/code/restserver?fname=cv I want to save fname value(here "cv") to database. how can i do that?