Struggling. ErrorLogs is the class, it belongs_to error_type. I want
the index page for ErrorLog (error_logs) to have a filter that can
limit selection to error_types...
My filter-menu happily shows the appropriate error_types... here is
my code.
def index
finder = params[:error_type] ?
ErrorLog.send(params[:error_type]) : ErrorLog
hobo_index finder
end
<collection: replace>
<table-plus fields="this, error_type, detail">
<empty-message:>No errors found!</empty-message:>
<prepend-header:>
<div class="filter">
Display by Error Type:
<filter-menu param-name="error_type"
options="&ErrorType.all"/>
</div>
</prepend-header:>
</table-plus>
</collection:>
...
I get an error saying:
NoMethodError in Error logsController#index
undefined method `ERROR_TYPE_1' for #<Class:0x4b919723>
...where ERROR_TYPE_1 is one of the errors in the dropdown...
I've tried following the online stuff I could find for this. I am
sure I am missing something simple. I also tried the def_data_filter
method in the controller but it doesn't like that (maybe we are using
an older version)...
Any thoughts are welcomed.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.