Topic: Very Basic API
I'm adding the ability to update users data in our 2.3.11 rails app and have got it working but it kinda looks ugly and I'm not certain I'm going down the best/right track.
Is there a DRYer/better way of doing the following in my api controller?
@userapi = User.find_by_username(params[:id])
@userapi.firstname = params[:fs]
The system sending the POST is using this URL structure
Which works because of the following line in the routes.rb
The security, validation and error checking are still to be sorted out, so this is a kind of fore runner question :-)
Any help, tips, opinions, will be gratefully received.