Extract to help method to fill in the data for the suggestions
This commit is contained in:
9
app/helpers/suggestions_helper.rb
Normal file
9
app/helpers/suggestions_helper.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
module SuggestionsHelper
|
||||
def suggest_data(record)
|
||||
{
|
||||
js_suggest_result: "js_suggest_result",
|
||||
js_suggest: ".js-suggest",
|
||||
js_url: polymorphic_path(record.class, action: :suggest)
|
||||
}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user