Sha256: 2fb58047b6bd17e73356af88c0fe71f00c86a56173eab7eaae37fbc026b3054b

Contents?: true

Size: 728 Bytes

Versions: 3

Compression:

Stored size: 728 Bytes

Contents

class DomainsController < ConsoleController
  def new
    @domain = Domain.new
  end

  def create
    @domain = Domain.new params[:domain]
    @domain.as = current_user

    if @domain.save
      redirect_to account_path, :flash => {:success => 'Your domain has been created'}
    else
      render :new
    end
  end

  def edit
    @domain = Domain.find(:one, :as => current_user) rescue redirect_to(new_domain_path)
  end

  def update
    @domain = Domain.find(:one, :as => current_user)
    @domain.attributes = params[:domain]
    if @domain.save
      redirect_to account_path, :flash => {:success => 'Your domain has been changed.  Your public URLs will now be different'}
    else
      render :edit
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
openshift-origin-console-1.3.4 app/controllers/domains_controller.rb
openshift-origin-console-1.3.3 app/controllers/domains_controller.rb
openshift-origin-console-1.3.2 app/controllers/domains_controller.rb