我在尝试索引数据时写了这个
= form_tag blog_posts_path, method: :get do
%p
= text_field_tag :query, params[:query]
= submit_tag "Search", name: nil
我得到了这个错误,我真的不知道如何解决它:
/home/marina/project/app/views/blog_posts/index.haml:15: syntax error, unexpected ')'
));}\n<p></p>\n#{
^
/home/marina/project/app/views/blog_posts/index.haml:15: syntax error, unexpected '<'
));}\n<p></p>\n#{
^
/home/marina/project/app/views/blog_posts/index.haml:15: unterminated regexp meets end of fail
/home/marina/project/app/views/blog_posts/index.haml:15: syntax error, unexpected $end, expecting keyword_end
提取的源代码(大约第 15 行):
12: %br
13:
14: = form_tag blog_posts_path, method: :get do
15: %p
16: = text_field_tag :query, params[:query]
17: = submit_tag "Search", name: nil
18: