Class: SimpleAddress::AddressesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- SimpleAddress::AddressesController
- Defined in:
- app/controllers/simple_address/addresses_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/controllers/simple_address/addresses_controller.rb', line 12 def create @address = Address.create(address_params) respond_to do |format| format.html { redirect_to @address } format.json { render json: { address_id: @address.id } } end end |
#edit ⇒ Object
20 21 |
# File 'app/controllers/simple_address/addresses_controller.rb', line 20 def edit end |
#new ⇒ Object
8 9 10 |
# File 'app/controllers/simple_address/addresses_controller.rb', line 8 def new @address = Address.new end |
#show ⇒ Object
5 6 |
# File 'app/controllers/simple_address/addresses_controller.rb', line 5 def show end |
#update ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/controllers/simple_address/addresses_controller.rb', line 23 def update @address.update(address_params) respond_to do |format| format.html { redirect_to @address } format.json { render json: { address_id: @address.id } } end end |