Действие по уничтожению:
def destroy
@tag = Tag.find(params[:id])
@tag.destroy
respond_to do |format|
format.html { redirect_to(tags_url) }
format.xml { head :ok }
end
end
Ссылка:
<a href="/tags/14" data-confirm="Are you sure?" data-method="delete" rel="nofollow">Destroy</a>
При нажатии на нее отображается действие шоу.
Started GET "/tags/14" for 127.0.0.1 at Wed Oct 27 18:36:41 -0500 2010
Processing by TagsController#show as HTML
Parameters: {"id"=>"14"}
Tag Load (0.2ms) SELECT "tags".* FROM "tags" WHERE ("tags"."id" = 14) LIMIT 1
Rendered tags/show.html.erb within layouts/application (8.5ms)
Completed 200 OK in 25ms (Views: 12.1ms | ActiveRecord: 0.2ms)
javascript_include_tag: значения по умолчанию включены в мою страницу, и теги скрипта отображаются правильно. Firebug не дает мне никаких ошибок. Это происходит как в Firefox, так и в Opera.