<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Rails - Consuming local JSON API from another controller]]></title>
		<link>http://railsforum.com/viewtopic.php?id=53448</link>
		<description><![CDATA[The most recent posts in Rails - Consuming local JSON API from another controller.]]></description>
		<lastBuildDate>Tue, 26 Feb 2013 13:05:10 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Rails - Consuming local JSON API from another controller]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=160686#p160686</link>
			<description><![CDATA[<p>Your question isn&#039;t really very clear.<br />You would be calling the update action in your api namespace from your android app. so you would just render a rabl template,<br />If you are updating a users&nbsp; credentials from withing your web app then that would be done through an admin namespace and would have the full CRUD actions in the users controller locked down by an admin user name and password.</p>]]></description>
			<author><![CDATA[dummy@example.com (jamesw)]]></author>
			<pubDate>Tue, 26 Feb 2013 13:05:10 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=160686#p160686</guid>
		</item>
		<item>
			<title><![CDATA[Rails - Consuming local JSON API from another controller]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=160434#p160434</link>
			<description><![CDATA[<p>Hi,</p><p>I am building an App that serves as the backend for an android app as well as a rails webapp. To serve as a back end, I have built a series of api controllers ( ex: api_users contoller with actions show, update etc.) which will return a JSON/ XML output (using RABL).</p><p>In my Webapp, when it is time to update the User profile say, I simply want to call the update action of the api_users controller and parson the json output in my User&#039;s controller, parse this output and then handoff the data to my view etc. How do I go about making such calls?</p><p>A very bad workaround seems to be to treat it like any external API and call it using Net::Http etc. It seems really strange that I should be able to consume an external api easily but not my local API. Can somebody help/ guide me to the recommended way of doing this?</p><p>Thanks,</p><p>Ramkumar.</p>]]></description>
			<author><![CDATA[dummy@example.com (lewstherin)]]></author>
			<pubDate>Sat, 23 Feb 2013 19:15:45 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=160434#p160434</guid>
		</item>
	</channel>
</rss>
