Martin
Martin

Reputation: 144

override redirect url after submit with <delete button> in Hobo rails

where is code for redirect .. i am using hobo 0.8 version with rails 2.x

'<pre>
'< 'def tag = "trash" attrs ="no-redirect" >

  < delete-button with="&this" after-submit="#{redirect_uri}" title = " #{tooltip}"
                 label="Erase !" class="nav-button" / >
</ def>'
</pre>

Upvotes: 0

Views: 163

Answers (1)

Bryan Larsen
Bryan Larsen

Reputation: 10026

redirects in Rails & Hobo are done in the controller, especially in 5 year old versions of Hobo. Hobo 2.0 has other ways of doing this, but in Hobo 0.8, this is your only option:

def destroy
  hobo_destroy
  redirect_to redirect_url
end

Upvotes: 1

Related Questions