Skip to content

Instantly share code, notes, and snippets.

@thomasstr
Last active December 25, 2015 04:19
Show Gist options
  • Save thomasstr/6916308 to your computer and use it in GitHub Desktop.
Save thomasstr/6916308 to your computer and use it in GitHub Desktop.
def index
@admin = Admin.all
end
def new
@admin = Admin.new
end
def destroy
@admin.destroy
respond_to do |format|
format.html { redirect_to dashboard_path, notice: "<%= admin.full_name %> slettet." }
format.json { head :no_content }
end
end
<%= link_to '<i class="icon-trash bigger-120"></i>'.html_safe, admin_registration_path(admin), method: :delete, data: { confirm: 'Are you sure?' %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment