Sha256: 1dbefe555262f93a78ab68b7bfff096fe4cf4a7f4e3a8f2c748d865a91af670f

Contents?: true

Size: 864 Bytes

Versions: 42

Compression:

Stored size: 864 Bytes

Contents

class <%= class_name %>Controller < ApplicationController

  hobo_user_controller

  auto_actions :all, :except => [ :index, :new, :create ]

  # Normally, users should be created via the user lifecycle, except
  #  for the initial user created via the form on the front screen on
  #  first run.  This method creates the initial user.
  def create
    hobo_create do
      if valid?
        self.current_user = this
        flash[:notice] = t("hobo.messages.you_are_site_admin", :default=>"You are now the site administrator")
        redirect_to home_page
      end
    end
  end
<% if invite_only? -%>

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

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
hobo-2.2.6 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.2.5 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.2.4 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.2.3 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.2.2 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.2.1 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.2.0 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.1.2 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.1.1 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.1.0 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.1.0.pre4 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.1.0.pre3 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.1.0.pre2 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.1.0.pre1 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.0.1 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.0.0 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.0.0.pre10 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.0.0.pre9 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-2.0.0.pre8 lib/generators/hobo/user_controller/templates/controller.rb.erb
hobo-1.3.3 lib/generators/hobo/user_controller/templates/controller.rb.erb