Displaying 3 results from an estimated 3 matches for "edit_address".
2008 Jun 14
0
NameError and routing problem
I have the following (abridged) routes in routes.rb:
map.namespace :member do |member|
member.resource :profile, :controller => ''profile'' do |profile|
profile.edit_address ''address/:id/edit'', :action =>
''edit_address'', :conditions => { :method => :get }
end
end
which nicely creates (among others):
member_profile_edit_address GET /member/profile/address/:id/edit
{:action=>"edit_address", :controlle...
2006 Nov 04
0
Check_box woes
...nd shipping_address_id in the
user table, which holds the relevant address id.
But in my form that allows a user to edit an address, including
nominating it as a marketing, shipping or billing address, I''m getting
stuck with the check_box helpers setting this up.
Here''s my form (edit_address.rhtml -- you''ll see that I have some
fields for both user and address objects in the form)
<% form_for :address, :url => { :action => "edit_address" }, :html =>
{:id => ''account_form''} do |f| %>
<dl>
<% fields_for :user, @address.u...
2009 Mar 13
2
ruby capitalizing singular version of route
Hi All,
I''ve searched on this topic and can''t seem to find anyone results saying
others have had the same problem, so hope someone here can help.
if in routes, I map addresses:
map.resources :addresses
If get the following routes:
addresses
new_Address
edit_Address
Note that the singular routes (new, edit) are capitalized.
to prove the issue, in console, I can type:
>> "addresses".singularize
=> "Address"
and you see it doesn''t happen with a word that doesn''t require more than
stripping the ''s'...