<%= link_to 'Скачать excel', exportsub_path(format: "xls") %>
def export
@subscribers = Subscriber.where(user_id: session[:user_id])
respond_to do |format|
format.html
format.xls
end
end
before_filter :set_charset
def set_charset
response.headers["Content-Type"] = "text/html; charset=utf-8"
end