Прошло много времени с тех пор, как я был занят Ruby on Rails в целом и HAML, поэтому я пытаюсь создать базовую форму, которая будет публиковать строку в URL-адресе / query. Но я получаю следующую ошибку в моем журнале:
> Started GET "/" for 192.168.33.82 at
> Wed Apr 06 08:23:09 -0700 2011
> Processing by
> SearchEngineController#search as HTML
> Rendered search_engine/search.haml
> within layouts/application (4.1ms)
> Completed in 5ms
>
> ActionView::Template::Error (compile
> error
> /home/arne.de.herdt/RailsApps/roularta/app/views/search_engine/search.haml:21:
> syntax error, unexpected kENSURE,
> expecting $end):
> 18: = label_tag :query, 'Search for: '
> 19: = text_field_tag('Search...')
> 20: .links app/views/search_engine/search.haml:21:in
> `compile'
Код из моего хамла:
!!!
%head
= stylesheet_link_tag 'stylesheet'
%title Roularta Search Engine
%body
.content
.header
.body
%h1 Roularta SearchEngine demonstration
%p
Welcome to the Roularta Ferret Engine. To make a search for specific keywords, use the search
form below to create your query. To upload new XML files into the Ferret Index, click the link
below the search form.
%p
= "Currently operating in '#{ENV['RAILS_ENV']}' environment"
.searchform
- form_tag '/upload', :method => :post do
= label_tag :query, 'Search for: '
= text_field_tag('Search...')
.links
Кто-нибудь, кто может сказать мне, чего не хватает?