I want to provide csv links in a view and I placed the csv generating code in
undefined method `send_data' for #<#<Class:0x0000010151c708>:0x0000010151a070>
send_data content, :type => "text/plain",
:filename => filename,
:disposition => 'attachment'
By default, methods in
ApplicationController are only accessible inside the Controllers.
Add a method to the
ApplicationController and expose it as a helper method with
class ApplicationController < ActionController::Base helper_method :foo def foo "bar" end end
foo method is accessible to both Controllers and Views.