<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Edit form fill action with a wrong locale]]></title>
		<link>http://railsforum.com/viewtopic.php?id=53338</link>
		<description><![CDATA[The most recent posts in Edit form fill action with a wrong locale.]]></description>
		<lastBuildDate>Fri, 22 Feb 2013 16:18:48 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Edit form fill action with a wrong locale]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=160308#p160308</link>
			<description><![CDATA[<p>Hi all.<br />I&#039;m using rails 3.2 and I have an issue with all my edit forms.<br />I&#039;m using a namespace (admin) and nested resources, also I&#039;m using internationalization.<br />This is my routes.rb:</p><div class="codebox"><pre><code>scope &quot;(:locale)&quot;, :locale =&gt; /en|it/ do  
    ...
    namespace :admin do
      resources :manufacturers do
        resources :articles, :except =&gt; [:index] do
          resources :article_images, :except =&gt; [:index, :show]
        end
      end
    end
end</code></pre></div><p>For instance I&#039;m using this form for articles:<br /></p><div class="codebox"><pre><code>&lt;%= form_for([:admin, :manufacturer, @article]) do |f| %&gt;</code></pre></div><p>But it generates this action in the form:<br />&lt;form id=&quot;edit_article_3&quot; class=&quot;edit_article&quot; method=&quot;post&quot; action=&quot;/3/admin/manufacturers/1/articles/3&quot; accept-charset=&quot;UTF-8&quot;&gt;</p><p>And I get a routing error: </p><div class="codebox"><pre><code>No route matches [PUT] &quot;/3/admin/manufacturers/1/articles/3&quot;</code></pre></div><p>I also tried this:<br /></p><div class="codebox"><pre><code>&lt;%= form_for(admin_manufacturer_articles_path(@article)) do |f| %&gt;</code></pre></div><p>and this:<br /></p><div class="codebox"><pre><code>&lt;%= form_for(admin_manufacturer_articles_path(@article, locale: nil)) do |f| %&gt;</code></pre></div><p>But the fields of the form are &quot;wrong&quot;:<br /></p><div class="codebox"><pre><code>&lt;input id=&quot;_3_admin_manufacturers_1_articles_name&quot; class=&quot;span6&quot; type=&quot;text&quot; size=&quot;30&quot; name=&quot;/3/admin/manufacturers/1/articles[name]&quot;&gt;</code></pre></div><p>What is wrong in my codes? <br />How can I get my edit forms working?<br />Thanks to all.</p>]]></description>
			<author><![CDATA[dummy@example.com (nimbuz77)]]></author>
			<pubDate>Fri, 22 Feb 2013 16:18:48 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=160308#p160308</guid>
		</item>
	</channel>
</rss>
