Sha256: fa382c6719ad6873ab0d9887b817fc8634bf52053a56fb19415e85106550ae00

Contents?: true

Size: 786 Bytes

Versions: 17

Compression:

Stored size: 786 Bytes

Contents

class <%= class_name %>Controller < ApplicationController

  hobo_user_controller

  auto_actions :all, :except => [ :index, :new, :create ]
<% if invite_only? -%>

  def create
    hobo_create do
      if valid?
        self.current_user = this
        this.password = this.password_confirmation = nil # don't trigger password change validations
        this.state = 'active'
        this.save
        flash[:notice] = ht("hobo.messages.you_are_site_admin", :default=>"You are now the site administrator")
        redirect_to home_page
      end
    end
  end

  def do_accept_invitation
    do_transition_action :accept_invitation do
      self.current_user = this
      flash[:notice] = ht("hobo.messages.you_signed_up", :default=>"You have signed up")
    end
  end
<% end -%>

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
hobo-1.1.0 rails_generators/hobo_user_controller/templates/controller.rb
hobo-1.0.3 rails_generators/hobo_user_controller/templates/controller.rb
hobo-1.1.0.pre4 rails_generators/hobo_user_controller/templates/controller.rb
hobo-1.1.0.pre3 rails_generators/hobo_user_controller/templates/controller.rb
hobo-1.1.0.pre2 rails_generators/hobo_user_controller/templates/controller.rb
hobo-1.1.0.pre0 rails_generators/hobo_user_controller/templates/controller.rb
hobo-1.0.2 rails_generators/hobo_user_controller/templates/controller.rb
hobo-1.0.1 rails_generators/hobo_user_controller/templates/controller.rb
hobo-1.0.0 rails_generators/hobo_user_controller/templates/controller.rb
hobo-0.9.106 rails_generators/hobo_user_controller/templates/controller.rb
hobo-0.9.105 rails_generators/hobo_user_controller/templates/controller.rb
hobo-0.9.104 rails_generators/hobo_user_controller/templates/controller.rb
hobo-0.9.103 rails_generators/hobo_user_controller/templates/controller.rb
hobo-0.9.102 rails_generators/hobo_user_controller/templates/controller.rb
hobo-0.9.101 rails_generators/hobo_user_controller/templates/controller.rb
hobo-0.9.100 rails_generators/hobo_user_controller/templates/controller.rb
hobo-0.9.0 rails_generators/hobo_user_controller/templates/controller.rb