0
나는 CSS와 JS 코드와 함께 만든 html 홈페이지가있다. 루비 응용 프로그램에 홈페이지로 포함시키고 싶습니다. 내 설정/routes.rb에서 나는이 있습니다 ruby가 홈 페이지를 html 파일로 바꾼다
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => 'welcome#index'
root :to => 'first_controller#index', :as => 'first_controller'
와의
내first_controller
나는이있다 :
class FirstControllerController < ApplicationController
def index
@users = User.all
end
end
가 내 html 파일로 리디렉션 def home
방법을 만들 수 있습니까?
@users = User.all
은 책의 메신저에서 가져온 코드입니다.이 코드는 루비 앱을 만드는 방법을 가르쳐 주며, 내 필요에 맞게 수정합니다. 들으