Ok, so here''s a question for you: I''ve got a handful of controllers, and they all publish RSS feeds through an "rss" action. What I''d like to do is have one main "RSS controller" that just makes one big feed for each controller. Now, it would be fairly easy for me to make the RSS controller handle different feeds for each other controller (just make an action for each other controller... the actions would be the same as the existing ''rss'' action in each controller, the only major difference is that now instead of getting an rss feed as "/photos/rss" it''d turn into "/rss/photos", which I kind of like). The problem is that my site isn''t really big enough to warrant having so many rss feeds, and I''d just like to have one feed with all the items in it. The first part of this is: how do I merge the @photos array, the @panoramas array, the @articles array, etc, all into one array, and have it sorted by the created_on field in the database? The second part of this is: once I''ve got this combined array, how do I get my rss feed to do different things for each type of entry? Eg, I want the photo entries done like this: xml.item do xml.author "rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (Rob Park)" xml.title "Photo for " + photo.created_on.strftime(''%A, %B %d, %Y'') xml.description "<img src=\"http://artography.ath.cx/pics/small#{photo.name}\" style=\"float:left;margin-right:1em;\" />" + photo.caption xml.pubDate Time.parse(photo.created_on.to_s).httpdate xml.link "http://artography.ath.cx/" + photo.created_on.to_s xml.guid "http://artography.ath.cx/" + photo.created_on.to_s end But I want my panoramas done like this: xml.item do xml.author "rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (Rob Park)" xml.title panorama.caption xml.description "<img src=\"http://artography.ath.cx/panos/small#{panorama.name}\" />" xml.pubDate Time.parse(panorama.created_on.to_s).httpdate xml.link "http://artography.ath.cx/panoramas" xml.guid panorama.name end And I want my articles done in yet another different way, etc etc etc. Is there an easy "railsy" way to do this? Thanks. -- Urban Artography http://artography.ath.cx
what IDE does everyone use for programming ROR? any suggestions?
There is no IDE made specifically for rails. With that said, there are a couple of IDEs for ruby. The most noteworthy one is FreeRide: ( http://rubyforge.org/projects/freeride/) On 4/30/05, jason lynes :: senyl.com <http://senyl.com> <jason-9ZYj/DJVokUAvxtiuMwx3w@public.gmane.org> wrote:> > what IDE does everyone use for programming ROR? any suggestions? > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> > > what IDE does everyone use for programming ROR? any suggestions?I don''t believe there are any specific to RoR, but there has been a bit of discussion about IDEs and editors on ruby-talk the past week. I personally use the Arachno Ruby IDE, and like it. I haven''t really tested much out with it other than basic functionality yet though. Steve
I use textmate On 4/30/05, Steve V <ruby-ChEX1j9zMF7JbC0vcoRRxNBPR1lH4CV8@public.gmane.org> wrote:> > > > > > what IDE does everyone use for programming ROR? any suggestions? > > I don''t believe there are any specific to RoR, but there has been a bit of > discussion about IDEs and editors on ruby-talk the past week. I personally > use the Arachno Ruby IDE, and like it. I haven''t really tested much out with > it other than basic functionality yet though. > > Steve > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On Sat, 2005-04-30 at 16:00 -0400, jason lynes :: senyl.com wrote:> what IDE does everyone use for programming ROR? any suggestions?kdevelop works nicely with RoR. (right-click version control commits!) -Robby -- /****************************************************** * Robby Russell, Owner.Developer.Geek * PLANET ARGON, Open Source Solutions & Web Hosting * Portland, Oregon | p: 503.351.4730 | f: 815.642.4068 * www.planetargon.com | www.robbyonrails.com *******************************************************/
On Windows i suggest jEdit (it comes with m-a-n-y syntax highlighting-themes) but for OS X there is nothing better than the current TextMate 1.1b7 with the overhauled Bundles-System. It even has a nice Rails-Bundle which will highlight most of the Keywords for your daily needs. .b Am 30.04.2005 um 21:37 schrieb Rob Park:> Ok, so here''s a question for you: I''ve got a handful of controllers, > and they all publish RSS feeds through an "rss" action. What I''d like > to do is have one main "RSS controller" that just makes one big feed > for each controller. > > Now, it would be fairly easy for me to make the RSS controller handle > different feeds for each other controller (just make an action for > each other controller... the actions would be the same as the existing > ''rss'' action in each controller, the only major difference is that now > instead of getting an rss feed as "/photos/rss" it''d turn into > "/rss/photos", which I kind of like). > > The problem is that my site isn''t really big enough to warrant having > so many rss feeds, and I''d just like to have one feed with all the > items in it. > > The first part of this is: how do I merge the @photos array, the > @panoramas array, the @articles array, etc, all into one array, and > have it sorted by the created_on field in the database? > > The second part of this is: once I''ve got this combined array, how do > I get my rss feed to do different things for each type of entry? Eg, I > want the photo entries done like this: > > xml.item do > xml.author "rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (Rob Park)" > xml.title "Photo for " + photo.created_on.strftime(''%A, %B %d, > %Y'') > xml.description "<img > src=\"http://artography.ath.cx/pics/small#{photo.name}\" > style=\"float:left;margin-right:1em;\" />" + photo.caption > xml.pubDate Time.parse(photo.created_on.to_s).httpdate > xml.link "http://artography.ath.cx/" + photo.created_on.to_s > xml.guid "http://artography.ath.cx/" + photo.created_on.to_s > end > > But I want my panoramas done like this: > > xml.item do > xml.author "rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (Rob Park)" > xml.title panorama.caption > xml.description "<img > src=\"http://artography.ath.cx/panos/small#{panorama.name}\" />" > xml.pubDate Time.parse(panorama.created_on.to_s).httpdate > xml.link "http://artography.ath.cx/panoramas" > xml.guid panorama.name > end > > And I want my articles done in yet another different way, etc etc etc. > > Is there an easy "railsy" way to do this? Thanks. > > -- > Urban Artography > http://artography.ath.cx > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
On Apr 30, 2005, at 4:00 PM, jason lynes :: senyl.com wrote:> what IDE does everyone use for programming ROR? any suggestions? >I have done evaluations of several environments and it appears that the most agile tech available is emacs + dmacro + mmm-mode. If there''s anything else you need, it''s also available for emacs. Trust your instincts. -Scott _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 4/30/05, Björn <bjoern-TFyySJyCJcUbwZ3undymew@public.gmane.org> wrote:> On Windows i suggest jEdit (it comes with m-a-n-y syntax > highlighting-themes) but for OS X there is nothing better than the > current TextMate 1.1b7 with the overhauled Bundles-System. > > It even has a nice Rails-Bundle which will highlight most of the > Keywords for your daily needs.You missed. -- Urban Artography http://artography.ath.cx
On 4/30/05, Rob Park <rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there an easy "railsy" way to do this? Thanks.Ok, I think I''ve got this one figured out. For reference, here is my RssController: class RssController < ApplicationController def index @headers["Content-Type"] = "text/xml; charset=utf-8" @photos = Photo.find(:all, :order => ''created_on DESC'', :limit => 10) @panos = Panorama.find(:all, :order => ''created_on DESC, name DESC'', :limit => 10) @articles = Article.find(:all, :order => ''created_on DESC'', :limit => 10) @items = @photos + @panos + @articles @items = @items.sort{|a,b| b.updated_on <=> a.updated_on} @items = @items[0..9] render_without_layout end end and here''s the view, index.rxml: xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8" xml.rss "version"=>"2.0" do xml.channel do xml.title "Urban Artography" xml.link "http://artography.ath.cx" xml.language "en-us" xml.ttl "1440" xml.description "Artistic photos of urban spaces..." xml.webMaster "rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (Rob Park)" xml.lastBuildDate Time.parse(@items[0].created_on.to_s).httpdate for item in @items xml.item do xml.author "rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (Rob Park)" xml.pubDate Time.parse(item.created_on.to_s).httpdate case item.class.to_s when "Photo" xml.title "Photo: " + item.caption xml.description "<img src=\"http://artography.ath.cx/pics/small#{item.name}\" />" xml.link "http://artography.ath.cx/" + item.created_on.to_s xml.guid "photo/" + item.name when "Panorama" xml.title "Panorama: " + item.caption xml.description "<img src=\"http://artography.ath.cx/panos/small#{item.name}.jpg\" />" xml.link "http://artography.ath.cx/panos/#{item.name}.jpg" xml.guid "panorama/" + item.name + ".jpg" when "Article" xml.title "Article: " + item.title xml.description item.blurb xml.link "http://artography.ath.cx/articles/" + item.slug xml.guid "article/" + item.slug end end end end end -- Urban Artography http://artography.ath.cx
I''ve heard some reports of eclipse usage and kdevelop. And a few people who use vim/emacs. By far though, I think most people here are using TextMate on OS X. I''m pretty sure that''s what DHH uses, too. Even though it''s packaged as an ''editor'' it has powerful macro capabilities and can work well with subversion. Brian On 4/30/05, Scott Barron <scott-HDQKq3lYuGDk1uMJSBkQmQ@public.gmane.org> wrote:> > On Apr 30, 2005, at 4:00 PM, jason lynes :: senyl.com wrote: > > > what IDE does everyone use for programming ROR? any suggestions? > > > > I have done evaluations of several environments and it appears that the > most agile tech available is emacs + dmacro + mmm-mode. If there''s > anything else you need, it''s also available for emacs. Trust your > instincts. > > -Scott > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > >-- The years ahead pick up their dark bags. They move closer. There''s a slight rise in the silence then nothing. -- (If you''re receiving this in response to mail sent to bluczkie-OM76b2Iv3yLQjUSlxSEPGw@public.gmane.org, don''t be concerned This is my new address, but mail will be forwarded here indefinitely)