public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
Michael Hartl (author)
Mon Feb 18 19:55:09 -0800 2008
commit  bf51bc45a0dce548a9b79ef5cf6a2bbc161cb9dc
tree    2f99af93e4e8410260d4321f4f931bf1301fdc9f
parent  840f7de1d480923b852b920857fe835f46b00bc4
insoshi / app / controllers / people_controller.rb
100644 27 lines (23 sloc) 0.662 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class PeopleController < ApplicationController
  # Be sure to include AuthenticationSystem in Application Controller instead
  include AuthenticatedSystem
  
 
  # render new.rhtml
  def new
  end
 
  def create
    cookies.delete :auth_token
    # protects against session fixation attacks, wreaks havoc with
    # request forgery protection.
    # uncomment at your own risk
    # reset_session
    @person = Person.new(params[:person])
    @person.save
    if @person.errors.empty?
      self.current_person = @person
      redirect_back_or_default('/')
      flash[:notice] = "Thanks for signing up!"
    else
      render :action => 'new'
    end
  end
 
end