RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: HammerInTheNews
My import button is not showing up in any browsers. I used this snippet in my customer.rb
def self.import(file) CSV.foreach(file.path, headers: true) do |row| Customer.create! row.to_hash end end
and this in my index.html.erb
<%= form_tag import_customers_path, multipart: true do %> <%= file_field_tag :file %> <% submit_tag "Import" %> <% end %>
Any thoughts?
My import button is not showing up in any browsers. I used this snippet in my customer.rb
and this in my index.html.erb
Any thoughts?