Sha256: 8178b017e235ec5fa41ebfc25e47202132adc77467ef1b12e366a6223c1ae347
Contents?: true
Size: 526 Bytes
Versions: 2
Compression:
Stored size: 526 Bytes
Contents
# Not auto loaded because we don't have a Gemfile for a test_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.4 | spec/test_app/app/controllers/addresses_demo_controller.rb |
subdivision_select-0.0.3 | spec/test_app/app/controllers/addresses_demo_controller.rb |