Sha256: a6bea2a645f79c9e31fece0cc6790d06b887d9b7f21cc110b869a3a49ad37c95

Contents?: true

Size: 891 Bytes

Versions: 4

Compression:

Stored size: 891 Bytes

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
  end

  def person_info_update
    @form_subject.multipart_form_controller_action = "person_info_update"
    return { :valid => @form_subject.update_attributes(params[:person]) }
  end

  def job_info
  end

  def job_info_update
    @form_subject.multipart_form_controller_action = "job_info_update"
    return { :valid => @form_subject.update_attributes(params[:person]) }
  end

  def hire_form
    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

4 entries across 4 versions & 1 rubygems

Version Path
acts_as_multipart_form-0.0.16 spec/dummy/app/controllers/people_controller.rb
acts_as_multipart_form-0.0.15 spec/dummy/app/controllers/people_controller.rb
acts_as_multipart_form-0.0.14 spec/dummy/app/controllers/people_controller.rb
acts_as_multipart_form-0.0.13 spec/dummy/app/controllers/people_controller.rb