Sha256: ad8c3a1f82cdbf1302c9e5f8a513df33f7fa414d7b006ae9cd2252057c3c73dc

Contents?: true

Size: 446 Bytes

Versions: 3

Compression:

Stored size: 446 Bytes

Contents

  def destroy
    @<%= singular_name %> = <%= class_name %>.find_by_id(params[:id])

    @<%= singular_name %>.destroy
    respond_to do |format|
      flash[:notice] = t('<%= plural_name %>.destroy.flash')
      format.html { redirect_to <%= plural_name %>_url }
    <%- unless options[:no_xml] -%>
      format.xml  { head :ok }
    <%- end -%>
    <%- unless options[:no_json] -%>
      format.json { head :ok }
    <%- end -%>
    end
  end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jfs-generators-0.2.0 rails_generators/jfs_scaffold/templates/actions/destroy.rb
jfs-generators-0.2.4 rails_generators/jfs_scaffold/templates/actions/destroy.rb
jfs-generators-0.2.3 rails_generators/jfs_scaffold/templates/actions/destroy.rb