<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: RESTful admin namespaced controller using scaffolding</title>
	<atom:link href="http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/feed" rel="self" type="application/rss+xml" />
	<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding</link>
	<description>Exploring hidden depths of web apps</description>
	<lastBuildDate>Tue, 16 Feb 2010 10:41:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Slobodan Kovačević</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-133</link>
		<dc:creator>Slobodan Kovačević</dc:creator>
		<pubDate>Tue, 16 Feb 2010 10:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-133</guid>
		<description>@Ankit The whole point is to have one model which is used for both frontend and admin controllers.</description>
		<content:encoded><![CDATA[<p>@Ankit The whole point is to have one model which is used for both frontend and admin controllers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ankit Varshney</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-132</link>
		<dc:creator>Ankit Varshney</dc:creator>
		<pubDate>Tue, 16 Feb 2010 04:27:33 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-132</guid>
		<description>And also there is no need to run two separate commands one for controller and one for scaffold. Simply run :

./script/generate scaffold admin/user name:string

This is true for Rails 2.3.5.</description>
		<content:encoded><![CDATA[<p>And also there is no need to run two separate commands one for controller and one for scaffold. Simply run :</p>
<p>./script/generate scaffold admin/user name:string</p>
<p>This is true for Rails 2.3.5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ankit Varshney</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-131</link>
		<dc:creator>Ankit Varshney</dc:creator>
		<pubDate>Tue, 16 Feb 2010 04:21:23 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-131</guid>
		<description>Why don&#039;t we move user model in admin folder? Like admin\user.rb and also changing the class name to Admin::User. By doing this there is no need to put :admin in any RESTful path.</description>
		<content:encoded><![CDATA[<p>Why don&#8217;t we move user model in admin folder? Like admin\user.rb and also changing the class name to Admin::User. By doing this there is no need to put :admin in any RESTful path.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamesw</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-128</link>
		<dc:creator>Jamesw</dc:creator>
		<pubDate>Thu, 14 Jan 2010 19:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-128</guid>
		<description>@Daniel the destroy link should use the [:admin, user] notation.
link_to &#039;Destroy&#039;, [:admin, theme], :confirm =&gt; &#039;Are you sure?&#039;, :method =&gt; :delete</description>
		<content:encoded><![CDATA[<p>@Daniel the destroy link should use the [:admin, user] notation.<br />
link_to &#8216;Destroy&#8217;, [:admin, theme], :confirm =&gt; &#8216;Are you sure?&#8217;, :method =&gt; :delete</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pawel</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-127</link>
		<dc:creator>pawel</dc:creator>
		<pubDate>Tue, 12 Jan 2010 12:37:19 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-127</guid>
		<description>Thanks Slobodan, it&#039;s a very useful tutorial. I have a one question: is it exists some newer solution? I ask you because this was posted on September 2008.

Greetings from Poland</description>
		<content:encoded><![CDATA[<p>Thanks Slobodan, it&#8217;s a very useful tutorial. I have a one question: is it exists some newer solution? I ask you because this was posted on September 2008.</p>
<p>Greetings from Poland</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Slobodan Kovačević</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-126</link>
		<dc:creator>Slobodan Kovačević</dc:creator>
		<pubDate>Mon, 11 Jan 2010 09:46:35 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-126</guid>
		<description>Zak, to &quot;protect the namespace&quot; you actually need to limit access to each controller (their actions to be precise) within that namespace. Usually you will add some before_filters that will handle authorization. Something like this:

before_filter :admin_only

Exact way to do this varies depending on what you use (if any) as an user system. For example, if you use Clearance you can do like this: http://wiki.github.com/thoughtbot/clearance/admin</description>
		<content:encoded><![CDATA[<p>Zak, to &#8220;protect the namespace&#8221; you actually need to limit access to each controller (their actions to be precise) within that namespace. Usually you will add some before_filters that will handle authorization. Something like this:</p>
<p>before_filter :admin_only</p>
<p>Exact way to do this varies depending on what you use (if any) as an user system. For example, if you use Clearance you can do like this: <a href="http://wiki.github.com/thoughtbot/clearance/admin" rel="nofollow">http://wiki.github.com/thoughtbot/clearance/admin</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zak</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-125</link>
		<dc:creator>Zak</dc:creator>
		<pubDate>Sun, 10 Jan 2010 21:36:45 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-125</guid>
		<description>Do you think it&#039;d be possible for you to teach us how to password protect the admin namespace?</description>
		<content:encoded><![CDATA[<p>Do you think it&#8217;d be possible for you to teach us how to password protect the admin namespace?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-124</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sun, 20 Dec 2009 23:42:16 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-124</guid>
		<description>...[head thumps against wall]...

link_to &quot;Show&quot;,  [:admin, @user]
link_to &quot;Edit&quot;, edit_admin_user_path(@user) 
link_to &quot;Destroy&quot;, user, :confirm =&gt; &#039;Are you sure?&#039;, :method =&gt; :delete</description>
		<content:encoded><![CDATA[<p>&#8230;[head thumps against wall]&#8230;</p>
<p>link_to &#8220;Show&#8221;,  [:admin, @user]<br />
link_to &#8220;Edit&#8221;, edit_admin_user_path(@user)<br />
link_to &#8220;Destroy&#8221;, user, :confirm =&gt; &#8216;Are you sure?&#8217;, :method =&gt; :delete</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-123</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sun, 20 Dec 2009 23:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-123</guid>
		<description>...arrrgh, the code got cut out. Here&#039;s the problematic code:



 &#039;Are you sure?&#039;, :method =&gt; :delete %&gt;</description>
		<content:encoded><![CDATA[<p>&#8230;arrrgh, the code got cut out. Here&#8217;s the problematic code:</p>
<p> &#8216;Are you sure?&#8217;, :method =&gt; :delete %&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding/comment-page-1#comment-122</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sun, 20 Dec 2009 23:39:32 +0000</pubDate>
		<guid isPermaLink="false">http://icebergist.com/?p=14#comment-122</guid>
		<description>Thanks for the really helpful code. I&#039;m trying to do this operation with admin and users (rather than categories) but getting a path error. 

The links in my admin/users index.html.erb page are causing errors. For example, the first &quot;show&quot; link is causing an  &quot;undefined method `admin_path&#039; for 

Here&#039;s the offending code on my index.html.erb



 &#039;Are you sure?&#039;, :method =&gt; :delete 

I have the following in my routes....

map.namespace :admin do &#124;admin&#124;
    admin.resources :users
  end

Any thoughts on what I&#039;ve done wrong? Thanks in advance for any help or suggestions!

Daniel</description>
		<content:encoded><![CDATA[<p>Thanks for the really helpful code. I&#8217;m trying to do this operation with admin and users (rather than categories) but getting a path error. </p>
<p>The links in my admin/users index.html.erb page are causing errors. For example, the first &#8220;show&#8221; link is causing an  &#8220;undefined method `admin_path&#8217; for </p>
<p>Here&#8217;s the offending code on my index.html.erb</p>
<p> &#8216;Are you sure?&#8217;, :method =&gt; :delete </p>
<p>I have the following in my routes&#8230;.</p>
<p>map.namespace :admin do |admin|<br />
    admin.resources :users<br />
  end</p>
<p>Any thoughts on what I&#8217;ve done wrong? Thanks in advance for any help or suggestions!</p>
<p>Daniel</p>
]]></content:encoded>
	</item>
</channel>
</rss>
