1

I am using acts_as_commentable. This is how the Model has comments added to it:

 commentable = Post.create
 commentable.comments.create(:title => "First comment.", :comment => "This is the first comment.")

the gem specifics can be found here:

https://github.com/jackdempsey/acts_as_commentable

In formtastic, I normally would pass the model, and then the input fields....would that still work?

 <%= semantic_form_form 'review' do |form| %>

     <%= form.input :title %>
     <%= form.input :comment %>
 <% end %>

And in the controller....?

  commentable.comments.create(params(:review))

I'm not sure if this would pass the hash that is usable....thanks!

Satchel
  • 16,414
  • 23
  • 106
  • 192

1 Answers1

0

Yes, this should work. Did you try it?

Just like Rails' form_for, you can pass in a :remote => true option for remote forms.

Justin French
  • 2,867
  • 19
  • 14