<?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: How to override &#8216;Create New&#8217; for activescaffold associations</title>
	<atom:link href="http://iwhome.com/frameworks-bestpractices/tech-notes/how-to-override-create-new-for-activescaffold-associations/feed/" rel="self" type="application/rss+xml" />
	<link>http://iwhome.com/frameworks-bestpractices/tech-notes/how-to-override-create-new-for-activescaffold-associations/</link>
	<description>Your guide to the rapidly evolving landscape of software engineering and web technology - since 1995.</description>
	<lastBuildDate>Fri, 21 Oct 2011 14:19:01 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: iwork</title>
		<link>http://iwhome.com/frameworks-bestpractices/tech-notes/how-to-override-create-new-for-activescaffold-associations/comment-page-1/#comment-10125</link>
		<dc:creator>iwork</dc:creator>
		<pubDate>Fri, 29 Apr 2011 20:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://iwhome.com/?p=149#comment-10125</guid>
		<description>Hi Vokler - thank you for answering!   I really appreciate the work on active_scaffold, I am using it extensively.  I&#039;m not sure though that any of the API: Column functions lets me modify the action; maybe I am setting it up wrong at an earlier step.  Here is my actual code:
&lt;code&gt;
   def render_action_link(link, url_options, record = nil, html_options = {})
&#160;&#160;&#160;if link.parameters[:association] == :qua_result and link.action == &#039;new&#039;
&#160;&#160;&#160;&#160;&#160;&#160;link_to &quot;Retrieve Results&quot;, :controller =&gt; &quot;qua_results&quot;, :action =&gt; &quot;retrieve&quot;, :job =&gt; record
&#160;&#160;&#160;else
&#160;&#160;&#160;&#160;&#160;&#160;...
&#160;&#160;&#160;end
  end
&lt;/code&gt;

So what I am doing is maybe not kosher, in that I am changing the action from :new to :retrieve.  I do not want the user to be prompted with a form to create a new &#039;results&#039; record, instead I want to retrieve a set of results from a remote location.  I guess I could have allowed :new and added a callback, but I do not want the user to have to see a form at all.  I just want to retrieve the results and then update the screen so that the user can see how many results there are and do things with them once they are retrieved.

I am new to Rails so it is very possible I am not doing this the &#039;right&#039; way.</description>
		<content:encoded><![CDATA[<p>Hi Vokler &#8211; thank you for answering!   I really appreciate the work on active_scaffold, I am using it extensively.  I&#8217;m not sure though that any of the API: Column functions lets me modify the action; maybe I am setting it up wrong at an earlier step.  Here is my actual code:<br />
<code><br />
   def render_action_link(link, url_options, record = nil, html_options = {})<br />
&nbsp;&nbsp;&nbsp;if link.parameters[:association] == :qua_result and link.action == 'new'<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;link_to "Retrieve Results", :controller =&gt; "qua_results", :action =&gt; "retrieve", :job =&gt; record<br />
&nbsp;&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br />
&nbsp;&nbsp;&nbsp;end<br />
  end<br />
</code></p>
<p>So what I am doing is maybe not kosher, in that I am changing the action from :new to :retrieve.  I do not want the user to be prompted with a form to create a new &#8216;results&#8217; record, instead I want to retrieve a set of results from a remote location.  I guess I could have allowed :new and added a callback, but I do not want the user to have to see a form at all.  I just want to retrieve the results and then update the screen so that the user can see how many results there are and do things with them once they are retrieved.</p>
<p>I am new to Rails so it is very possible I am not doing this the &#8216;right&#8217; way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Volker Hochstein</title>
		<link>http://iwhome.com/frameworks-bestpractices/tech-notes/how-to-override-create-new-for-activescaffold-associations/comment-page-1/#comment-9766</link>
		<dc:creator>Volker Hochstein</dc:creator>
		<pubDate>Thu, 14 Apr 2011 17:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://iwhome.com/?p=149#comment-9766</guid>
		<description>Maybe the following helps you:
https://github.com/activescaffold/active_scaffold/wiki/API%3A-Column

actions_for_association_links</description>
		<content:encoded><![CDATA[<p>Maybe the following helps you:<br />
<a href="https://github.com/activescaffold/active_scaffold/wiki/API%3A-Column" rel="nofollow">https://github.com/activescaffold/active_scaffold/wiki/API%3A-Column</a></p>
<p>actions_for_association_links</p>
]]></content:encoded>
	</item>
</channel>
</rss>
