There is such a structure:
In _kurators.html.erb I try to render a partial:
<%= render :partial => 'kurators/simple_list' %> In kurators/simple_list I try to call the model method:
<%= get_issues_by_me %> Model kurator.rb :
class Kurator < ActiveRecord::Base def get_issues_by_me 'test' end end I get the error:
undefined local variable or method `get_issues_by_me' for #<#<Class:0x00000004146988>:0x00000004257278> What am I doing wrong?
UPDATE:kurators_helper.html.erb :
module KuratorsHelper def kurators_helper_test 'test' end end
get_issues_by_meis a model method in the context of a view? - MAXOPKA<%= Kurator.get_issues_by_me %>, but in this case I get the error:undefined method get_issues_by_me for Kurator(Table doesnt exist):Class. Yes, that's right, I don't have a table, but I don’t need it, I just need to return the data from this method - S.Ivanovdef self.get_issues_by_me- MAXOPKA