Coder Social home page Coder Social logo

asked's Introduction

#4차산업혁명 선도인재 양성 프로젝트 과정

1. Week 1 Day 5: asked


  1. question (제목, 내용)
  • controller : question

  • action : index, show

    • index.erb : form을 통해 질문을 받는다(익명, 공개)
    • show에서 입력된 질문을 보여준다
  • model

    • name(질문자이름)

    • content(내용)

  1. rails g model (모델명)
  2. migration 파일 작성
  3. rake db:migrate table생성

회원가입

== database에 유저 정보를 저장하는 것

  1. User 테이블 생성
  • User model

rails g model xxx

  1. User 정보를 저장
  • 회원정보를 받아, DB에 저장

로그인

== session 유저 정보를 검증을 거친 후 저장하는것

  1. User 정보를 받는다

  2. 받은 User 정보와 DB의 User 정보가 일치하는지 확인

  3. if 일치, session에 유저 정보를 넣는다

    else, 이유를 말해주고 로그인 안시킨다.

  4. 로그아웃

    session.clear

asked's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.