-
Image scss,css에서 사용하기
rails assets/image scss,css에서 사용하기 매우 심플! background:url(asset_path('파일명'));
-
[github] 원격 저장소 url 변경하기
[Github] 원격 저장소 URL 변경하기 원격 저장소(remote) URL 변경하기 기존 원격 저장소 URL을 변경하기 위해 git remote set-url명령어를 사용한다. # View existing remotes $ git remote -v origin https://github.com/user/repo.git (fetch) origin https://github.com/user/repo.git (push) # Change the 'origin' remote's URL $ git remote set-url origin https://github.com/user/repo2.git # Verify new remote URL $ git remote -v origin https://github.com/user/repo2.git (fetch) origin https://github.com/user/repo2.git (push) Simple! 참고 글
-
Devise email validation 해제 하기
devise email validation 해제 하기 베리 심플! 1. user.rb devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable # , :validatable def email_required? false end :validatable 삭제하고 email_required를 만들어준다. 2. 뷰 작업 뷰에서 input type=”email”로 되어 있기 때문에 바꿔준다. rails g devise:views view들을 생성해주고 app/views/devise/sessions/new.html.erb [...] <%= f.text_field :email, required: false, autofocus: true %> [...] app/views/devise/registrations/edit.html.erb [...] <%= f.text_field :email, required: false, autofocus: true %> [...] app/views/devise/registrations/new.html.erb [...] <%= f.text_field :email, required: false, autofocus: true %> [...] 완성!!...
-
Using jquery in Rails
Using jquery in Rails rails에서 jquery를 사용하는 방법 일단 rails에서는 기본적으로 (5.0.버전 제외) jquery를 포함 application.js 구조 //= require jquery //= require jquery_ujs //= require turbolinks //= require_tree . 기본적으로 포함되어 있는 부분 주의해야 할 점은 추가적으로 부트스트랩이나 다른 여타 js 라이브러리 gem을 설치할 때 항상 jquery_ujs 밑에 설치해야함 turbolinks의 역활은 header를 다시 안 불러오게 하기 위해서 tree .는 javascripts 폴더 안에 있는 내용들을 자동으로 불러오게 하기 위해서 js 코드 작성(jquery 사용) 일반적으로 /app/assets/javascripts 폴더...
-
WATSON API
WATSON API 1. IBM WATSON API란? 기업의 Cognitive Business를 지원하기 위해 클라우드 형태로 제공되는 인지 소프트웨어 플랫폼. 기업에서 쓰는 프로그램에서 인지/인공지능 기능을 불러와서 사용할 수 있도록 다양한 프로그램 인터페이스를 제공. 1. Cognitive Business란? digital business + digital intelligence를 뜻하며 전에는 활용하지 못했던 비정형 데이터(휴대폰의 사진, 콜센터 직원과의 상담 내용) 들을 이해하고 추론하고 학습을 통해 유의미한 결과를 제공함 2. 클라우드 watson은 물리적인 슈퍼 컴퓨터의 형태로 존재하지 않고 클라우드 플랫폼에서 구동되는 API형태 2. WATSON API 종류 Conversation...