search for: mailing_addresses

Displaying 2 results from an estimated 2 matches for "mailing_addresses".

2010 Sep 10
10
current_page? inside controller
Is there any easy way of using something like current_page? method from ActionView::Helpers::UrlHelper inside controller ? I have routing like: resources :addresses resources :mailing_addresses, :controller => ''addresses'' And I would like to do a check in my controller that would look like this: class AddressesController def index if current_page?(live_addresses_path) # ... logic goes here elsif current_page?(addresses_path) # ... logic goes...
2006 Jan 26
1
Explanation on Activerecord Associations
A while back, I had some doubts on the use of associations. I still haven''t got a satisfactory guidance so that I can spring ahead with the project. I am trying to understand from a ruby point of view on doing things. Basically I have a controller that gives me a list of students. And each student may have say home address and mailing address. Hence I can model as shown below. How do I