Sha256: 96a6cfc8c1c69b7941f0a659f559ac57cd44c86df6e59e5c2b73b230ad3724a9
Contents?: true
Size: 1.07 KB
Versions: 2
Compression:
Stored size: 1.07 KB
Contents
class PeopleController < ApplicationController acts_as_multipart_form :name => :hire_form, :parts => [:person_info, :job_info], :model => "Person", :form_route => "person_hire_form" def person_info @person = Person.find(params[:id]) end def person_info_update @person = Person.find(params[:id]) if @person.update_attributes(params[:person]) return {:valid => true} else return {:valid => false} end end def job_info @person = Person.find(params[:id]) end def job_info_update @person = Person.find(params[:id]) if @person.update_attributes(params[:person]) return {:valid => true} else return {:valid => false} end end def hire_form #puts "stub method for the hire form" @person = Person.find(params[:id]) respond_to do |format| format.html end end def index @people = Person.all load_multipart_form_index_links(:hire_form, @people) respond_to do |format| format.html end end def show respond_to do |format| format.html end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
acts_as_multipart_form-0.0.2 | spec/dummy/app/controllers/people_controller.rb |
acts_as_multipart_form-0.0.1 | spec/dummy/app/controllers/people_controller.rb |