Sha256: 7ae63d5859ebdeb180305955f49d36260e67f45507e319f532be58d40aeb0d2a

Contents?: true

Size: 362 Bytes

Versions: 21

Compression:

Stored size: 362 Bytes

Contents

module Blog::Controllers
  class Login
    def post
      @user = User.find :first, :conditions => ['username = ? AND password = ?', input.username, input.password]
      
      if @user
        @login = 'login success !'
        @state.user_id = @user.id
      else
        @login = 'wrong user name or password'
      end
      render :login
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
bivouac-0.0.6 examples/blog_goh/app/controllers/login.rb
bivouac-0.0.7 examples/blog_goh/app/controllers/login.rb
bivouac-0.0.3 examples/blog_goh/app/controllers/login.rb
bivouac-0.0.4 examples/blog_goh/app/controllers/login.rb
bivouac-0.0.5 examples/blog_goh/app/controllers/login.rb
bivouac-0.0.9 examples/blog_goh/app/controllers/login.rb
bivouac-0.1.1 examples/blog_goh/app/controllers/login.rb
bivouac-0.0.8 examples/blog_goh/app/controllers/login.rb
bivouac-0.1.0 examples/blog_goh/app/controllers/login.rb
bivouac-0.1.3 examples/blog_goh/app/controllers/login.rb
bivouac-0.1.5 examples/blog_goh/app/controllers/login.rb
bivouac-0.1.2 examples/blog_goh/app/controllers/login.rb
bivouac-0.1.4 examples/blog_goh/app/controllers/login.rb
bivouac-0.2.0 examples/blog_goh/app/controllers/login.rb
bivouac-0.1.6 examples/blog_goh/app/controllers/login.rb
bivouac-0.2.2 examples/blog_goh/app/controllers/login.rb
bivouac-0.2.3 examples/blog_goh/app/controllers/login.rb
bivouac-0.2.1 examples/blog_goh/app/controllers/login.rb
bivouac-0.3.0 examples/blog_goh/app/controllers/login.rb
bivouac-0.2.4 examples/blog_goh/app/controllers/login.rb