0

I need to redirect to a specific item in my edit page, I used redirect to but I can't add the #tab_id this is my source code :

  if @song.save
  flash[:notice] = I18n.t('message.success')
  #render action: 'edit'
  redirect_to edit_song_path(@song.id)#tablineT_18_5

the tab_id is named : '#tablineT_18_5'

jmattheis
  • 10,494
  • 11
  • 46
  • 58
youssef hassoun
  • 340
  • 1
  • 4
  • 18

1 Answers1

0

Try something like,

redirect_to edit_song_path(@song, :anchor => "tablineT_18_5")

Also, check out this post https://stackoverflow.com/a/4981205/2403343

Community
  • 1
  • 1