我有一個Rails 3應用與設計......的Rails 3 - 設置帳戶控制器rw查看
我想創建一個帳戶控制器將允許用戶更新他們的帳戶,像個人資料,賬戶,通知,密碼等...
這是我到目前爲止所做的。
我產生這給了我下面的帳戶控制器:
路線: 現在存在與/視圖/帳戶給上面的名稱
get "account/profile"
get "account/password"
get "account/notices"
查看/ ...
我的控制器
class AccountController < ApplicationController
before_filter :authenticate_user!
def profile
@user = User.find(current_user.id)
end
def password
end
def notices
end
def privacy
end
def disable
end
end
信息查看賬戶資料:
<% form_for @user, :html => { :multipart => true} do |f| %>
問題是,使格式如:
<form accept-charset="UTF-8" action="https://stackoverflow.com/users/13" class="edit_user" enctype="multipart/form-data" id="edit_user_13" method="post">
而且我希望它像/account/profile/update
這哪裏是形式要張貼檢查?
這是我第一次做這樣的事情。我在正確的軌道上?如何添加/ account/profile/update部分?在路線中添加一些內容並更改表單標籤?在路線中有沒有更乾淨的方法?
謝謝