<%= 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 %>
And I got that error,
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 ^
Change
data-length
to'data-length'
: