I need to replace the values from an array
tag_list = ['tag1', tag4, .. tag_n]
with the id's of a corresponding database model 'tags'
@tags = [{:id => '1', :name => 'tag1'}, {:id => '2', :name => 'tag2' ...}]
The desired output of the 'tag_list' should look like
tag_list_new=['1','4',..'n']
After trying and searching the web, I don't find any solution working for me.
Ps. I am relatively new to rails and really hope for a working answer, thanks in advance!