Sha256: 9fa8fc69fc75d15aa453b00673cc628641514c67ede2cc4d096d045a0afccf0d

Contents?: true

Size: 725 Bytes

Versions: 14

Compression:

Stored size: 725 Bytes

Contents

module Admin
  class MembershipsController < BaseController

    sections 'settings'

    def create
      @membership = current_site.memberships.build(params[:membership])

      case @membership.process!
      when :create_account
        redirect_to new_admin_account_url(:email => @membership.email)
      when :save_it
        respond_with @membership, :location => edit_admin_current_site_url
      when :error
        respond_with @membership, :flash => true
      when :nothing
        respond_with @membership, :alert => t('flash.admin.memberships.create.already_created'), :location => edit_admin_current_site_url
      end
    end

    def destroy
      destroy! { edit_admin_current_site_url }
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
locomotive_cms-1.0.0.beta.2 app/controllers/admin/memberships_controller.rb
locomotive_cms-1.0.0.beta app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta12 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta11 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta10 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta9 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta8 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta7 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta5 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta4 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta3 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta2 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4.beta1 app/controllers/admin/memberships_controller.rb
locomotive_cms-0.0.4 app/controllers/admin/memberships_controller.rb