Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何使用其他页面(非默认)编辑用户(设计gem)?_Ruby On Rails - Fatal编程技术网

Ruby on rails 如何使用其他页面(非默认)编辑用户(设计gem)?

Ruby on rails 如何使用其他页面(非默认)编辑用户(设计gem)?,ruby-on-rails,Ruby On Rails,如何使用另一个页面(不是defaule)编辑用户(设计gem) 我有这样的情况:我需要一些页面来为用户添加属性,但我想使用编辑用户注册-我想使用另一个页面。 因此,我需要在registrations controller中创建另一个操作,并将其添加到routes.rb中。我还在registrations文件夹中创建了另一个文件,但在实现上遇到了问题。 这是我的注册管理员: def paypal end 和paypal.html.erb: <%= form_for(reso

如何使用另一个页面(不是defaule)编辑用户(设计gem)

我有这样的情况:我需要一些页面来为用户添加属性,但我想使用编辑用户注册-我想使用另一个页面。 因此,我需要在registrations controller中创建另一个操作,并将其添加到routes.rb中。我还在registrations文件夹中创建了另一个文件,但在实现上遇到了问题。 这是我的注册管理员:

   def paypal

   end
和paypal.html.erb:

 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |d| %>
  <%= d.email_field :paypal_email %>
  ...
 <%end%>

修改默认视图有效吗?(
railsgdesigne:views
左右)@grilix,我的意思是-我需要另一页。编辑注册-工作,但我需要一个用于编辑。
   devise_for :users, :controllers => {:registrations => 'registrations', :sessions => 'sessions'} do 
     registrations#paypal//something here instead
   end