Ruby on Rails: Saving query string parameter value to database
I search goo开发者_StackOverflow中文版gle 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?
Make a model for it? This is very vague... but define a model called Fname and give it the attribute "value"
Then...
Fname.create(:value => params[:fname])
I think this is where you're going, yeah?
精彩评论