John
John

Reputation: 5905

How to create a post from iPhone to Rails

Newbie to Rails and iOS here. I have a Rails blog application with Post model that has just a title and and image. I can create a new Post from a browser using the following html.erb code:

  <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </div>
  <p>  
    <%= f.file_field :image %>  
  </p> 
  <div class="actions">
    <%= f.submit %>
  </div>

But how would I do this from an iPhone app? Is there an equivalent form function in iOS?

Upvotes: 0

Views: 320

Answers (1)

electronicbites
electronicbites

Reputation: 104

I can recommend you using ASIHttpRequest, especially the class ASIFormDataRequest. With this you can send form data easily as a POST request.

Upvotes: 3

Related Questions