序列化.to_sym

 

<%= link_to t('links.list'), showable_paths[@subchannel_item.showable_type.to_sym], target: '_blank', id: 'showable-link' %>

def showable_paths
{ 
   #Filter: cibn_filterlists_path,
   Video: videos_path,
   Subject: cibn_special_subjects_path,
   Star: stars_path
} 
end

 

posted @ 2016-04-14 16:04  冰凌花花~  阅读(120)  评论(0编辑  收藏  举报