Changes arguments of DmsfLinksHelper#files_for_select
The second argument 'folder_id' is set to nil by default. This could be overridden if necessary. Defining a default value for the helper method prevents the view partial 'dmsf_links/_form.html.erb' to raise an ActionView::Template::Error due to a missing argument.
This commit is contained in:
parent
38b6de3ba7
commit
3edf629389
@ -35,7 +35,7 @@ module DmsfLinksHelper
|
||||
str&.match?(/\A\d+\Z/)
|
||||
end
|
||||
|
||||
def files_for_select(project_id, folder_id)
|
||||
def files_for_select(project_id, folder_id = nil)
|
||||
files = []
|
||||
if DmsfLinksHelper.number?(folder_id)
|
||||
folder = DmsfFolder.find_by(id: folder_id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user