I have the following code in rails
<% @post.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
SyntasticCheck VIM plug in keeps displaying this error
app/views/posts/new.html.erb[Syntax: line:12 (1)]
1 app/views/posts/new.html.erb|12 warning| possibly useless use of a variable in void context
If all you want is not to see these messages again:
let g:syntastic_eruby_ruby_quiet_messages =
\ {'regex': 'possibly useless use of a variable in void context'}
If there is a posibility that the warning will help in the future, the best thing to do is add .to_s
to the msg
so it makes the warning go away but you don't filter future warnings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With