Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Form (create.rb)
- <% form_for :reseller, :url => {:action => "add_reseller" } do |f| %>
- <center><h3>Create Reseller</h3></center>
- <label>Username:</label><br><%= f.text_field :user %><br>
- <label>Password:</label><br><%= f.text_field :password %><br>
- <label>E-Mail:</label><br><%= f.text_field :email %><br>
- <label>Client Exec ID:</label><br><%= f.text_field :clientexec %><br>
- <%= button_to "Create Reseller" %>
- <% end %>
- ## Controller (admin_controller.rb)
- class AdminController < ApplicationController
- before_filter :login_required
- def index
- end
- def create
- end
- def add_reseller
- @reseller = Reseller.new(:user => params[:user], :password => params[:password], :email => params[:email], :client_exec => params[:clientexec])
- redirect_to :action => ""
- end
- end
Add Comment
Please, Sign In to add comment