# Make accessible object

**URL:** <https://www.ruby-forum.com/t/make-accessible-object/151313>\
**Category:** Rails\
**Created:** [October 20, 2008, 9:51am UTC](https://www.ruby-forum.com/t/make-accessible-object/151313 "2008-10-20T09:51:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jicksta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ba0ec/32.png) [@jicksta](https://www.ruby-forum.com/u/jicksta)\
**Post date:** [October 20, 2008, 9:51am UTC](https://www.ruby-forum.com/t/make-accessible-object/151313/1 "2008-10-20T09:51:38Z")

</div>

Hi, I’ve created a form and when I click “Place Order” button, I’m taken  
to the checkout details page with all the details about the customer and  
the bookings and then there is a “Confirm” button, on clicking which all  
the details will be saved in the database tables. But a silly problem  
(ended up being huge for me), heres what I’ve done:

VIEW:  
\<%form\_for :customer, :url =\> {:action =\> :checkout\_details} do |form|%\>  
…  
\<%=submit\_tag “Place Order”%\>  
\<%end\>

CONTROLLER:  
def checkout\_details  
@customer = Customer.new(params[:customer])  
end

Until now I could get the object of the Customer and hence all the  
inputs from the user but this checkout\_details.rhtml doesn’t save  
anything it just displays all the customer details and booking details  
and a “Confirm” button on clicking which “save\_details” action will be  
called which saves all the details. So, how can I pass this @customer  
object to this save\_details action? Sorry, if it is silly, but big  
enough for me to get stuck.  
Thanks…

---

<div class="post-metadata">

**Author:** ![jicksta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ba0ec/32.png) [@jicksta](https://www.ruby-forum.com/u/jicksta)\
**Post date:** [October 20, 2008, 11:26am UTC](https://www.ruby-forum.com/t/make-accessible-object/151313/2 "2008-10-20T11:26:09Z")

</div>

> **[ActionController::Base](https://api.rubyonrails.org/classes/ActionController/Base.html#M000459)**
>
> Action Controllers are the core of a web request in Rails. They are made up of one or more actions that are executed on request and then either it renders a template or redirects to another action.

I do recommend you buy a book on Rails. It is worth the  
investment.

On Oct 20, 12:51 pm, Jay P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
