import livre d'or
This commit is contained in:
parent
b6cc08ec16
commit
8c42c589a8
@ -11,7 +11,7 @@ class Admin::CommentsController < ApplicationController
|
||||
before_filter :find_comments
|
||||
|
||||
|
||||
def index
|
||||
def import_csv
|
||||
require 'csv'
|
||||
|
||||
csv_text = File.open(Rails.root.join("comments.csv")).read.encode("utf-8")
|
||||
@ -30,6 +30,10 @@ class Admin::CommentsController < ApplicationController
|
||||
c.created_at = row[2]
|
||||
c.save
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user