The form_tag
method takes a block for the form contents. In your first form you have’t provided a block at all since nothing is indented below it. In the second case there is content indented below, but you haven’t included the do
. This second case is causing the syntax error.
What I think you want is
#social_list
- # note 'do' added to this line:
= form_tag notes_path, class: 'form clearfix', id: 'add_post_form',multipart: true, remote: true do
- # this section indented:
.control-group
= text_area_tag "comment[text]", '', :placeholder => 'Post to the community', :cols => nil, :rows => nil, :class => 'mention expand-without-submit'
= file_field_tag "picture", id:'image_upload', accept: 'image/png,image/gif,image/jpeg'
= submit_tag "Post your message", class: 'btn btn-success btn-mini'
- # 'do'added to next line
= form_tag images_path do
= submit_tag 'asad'
= render "dashboards/activity_stream_filter"