Sha256: e11e1e234dded987c015e171bd63d511b7bc323e9f52f03cd100f4a5976a27d3

Contents?: true

Size: 530 Bytes

Versions: 2

Compression:

Stored size: 530 Bytes

Contents

# Not auto loaded because we don't have a Gemfile for this dummy app
require "country_select"

class AddressesDemoController < ApplicationController
  def index
    @addresses = Address.all
  end

  def tags
    @addresses = Address.all
  end

  def update
    @address = Address.find(params[:id])

    if @address.update_attributes(address_params)
      redirect_to root_path, notice: "Updated address!"
    end
  end

  private

  def address_params
    params.require(:address).permit(:title, :subdivision, :country)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
subdivision_select-0.0.6 spec/dummy/app/controllers/addresses_demo_controller.rb
subdivision_select-0.0.5 spec/dummy/app/controllers/addresses_demo_controller.rb