在我的控制器中,我有:
@cabs_city = VwVolsCabs.all
@cabs_city = @cabs_city.each { |s| s.gsub! /[^[:alnum:]]/, '' }
看法:
<% @cabs_city.each do |s| %>
<%= s.cab_name %>
<% end %>
但我有这个错误:
NoMethodError (undefined method `gsub!' for #<VwVolsCabs:0x000000089e8dd0>):