I have a method in the controller class
class ProjectsController < ApplicationController def download_sftp some codes here end end
and to have access to it in my view, at the top of my controller I have this line
helper_method :download_sftp
when I use the following code in my view, I get the undefined download_sftp method for this project
<tbody> <% @projects.each do |project| %> <tr> <td><%= link_to 'download',project.download_sftp(project) %></td> </tr> <% end %> </tbody>
source share