ruby rails 个助手 html5

ruby on rails helpers html5

<%= form_for(:description, url:{action:'create'}) do |f| %>
    <div class="row">
      <div class="input-field col s6">
        <%= f.text_field :position, data-length:30 %> 
        <label for="position">Position</label>
      </div> 
   </div>
<% end %>

我遇到了那个错误,

syntax error, unexpected keyword_do_block d=( f.text_field :position, do data-length:30 );@output_buf ^ /home/whitehat/Documents/Books/Web development/Ruby On Rails/Projects/free-lance/dressing-shop/app/views/products/new.html.erb:39: syntax error, unexpected tSYMBEG, expecting keyword_do or '{' or '(' ld :position, do data-length:30 );@output_buffer.safe_appen ^

data-length改为'data-length':

<%= f.text_field :position, 'data-length': 30 %>