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