views:

13

answers:

1

Hi, I'm facing this problem, I have a model called Post and I'm creating a new post in this way

def create
   @post = Post.new(params[:post])
   @post.save
end

so, if I want to give at the user the possibility to create a post from his website, what should I do? I need to create a sort of webservices? Thank you

A: 

Maybe I don't understand the question completely, but you essentially just want to provide to the user an api for interacting with your site programatically, so that they can create records in your app, right? In that case, your app should already work, but you'll probably want to provide an easier to parse return format, like xml or json, by using a render block. Maybe there is something else you're asking?

jasonpgignac