-1

HAML でこの ERB コードを記述する方法:

<head>
  <meta charset="utf-8">
  <title><%= title %></title>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
  <%== meta_data_tags %>
  <%= favicon_link_tag image_path('favicon.ico') %>
  <link rel="apple-touch-icon" href="apple-touch-icon.png">
  <link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon-114x114.png">
  <%= stylesheet_link_tag 'store/all', :media => 'screen' %>
  <%= csrf_meta_tags %>
  <%= javascript_include_tag 'store/all' %>
  <!--[if lt IE 9]>
    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6/html5shiv.min.js"></script>
  <![endif]-->
  <%= render "spree/shared/routes" %>
  <%= yield :head %>
</head>

これに特に興味がある

<%== meta_data_tags %>

コードスニペット。

4

2 に答える 2

2

私は私の質問に対する答えを見つけました:

= raw(meta_data_tags)

<%== %>と同じ<%= raw() %>です。同じ結果を達成するための高速ヘルパーです。

助けてくれてありがとう。=)

于 2013-10-21T19:49:04.860 に答える