1
나는 this 있습니다.새로운보기 추가 rhomobile 컨트롤러
Rhomobile에서 config/routes.rb
과 ApplicationController
을 어떻게 찾을 수 있습니까?
기존 rhomobile 컨트롤러에보기를 추가하는 방법은 무엇입니까?
가능합니까?
나는 this 있습니다.새로운보기 추가 rhomobile 컨트롤러
Rhomobile에서 config/routes.rb
과 ApplicationController
을 어떻게 찾을 수 있습니까?
기존 rhomobile 컨트롤러에보기를 추가하는 방법은 무엇입니까?
가능합니까?
config/routes.rb는 Rhomobile에는 존재하지 않습니다. 내가 틀리지 않다면 그것은 레일에 존재합니다.
두 번째로 "application.rb"는 Rhomobile의 "ApplicationController"와 비슷합니다.
기존 모델에 새 뷰를 추가하려는 경우 새 메서드 (def)를 컨트롤러 (.rb)에 추가하고 새로운 뷰 (.erb)를 새 메서드와 같은 이름으로 추가하십시오.
app/Demo에 DemoController.rb 모델이 있다고 가정 해 보겠습니다. 당신이
<button onclick="location.href='/app/Demo/new_method'">new method</button>
또는
<button onclick="location.href='<%= url_for :action => :new_method %>'"
>new method</button>
당신이 날은 slivu 도움이 될 수를 쓸 수 있습니다 당신은 NEW_METHOD에 인덱스보기에서 탐색
등이 여기에 새로운 방법을 추가 할 수 있습니까? –