我有一个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部分?在路线中添加一些内容并更改表单标签?在路线中有没有更干净的方法?
谢谢