similar to: xml builder cache (with a slight problem on initial load)

Displaying 20 results from an estimated 300 matches similar to: "xml builder cache (with a slight problem on initial load)"

2006 Nov 05
0
Any workaround for Rails caching?
> > I mean fragment caching. I get errors like this: > > > > ActionView::TemplateError > > (/usr/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:192:in > > `method_missing'': no such method `length'') on line #0 > > of app/views/items/index.mab: > > 1: > > 2: cache("#{@site.server_name}/index_items") do > >
2007 Sep 04
5
Xml templates...
I was looking in using an xml_builder template to do something like: blee.xerb xml.blees do <% for blee in @blees %> xml.blee = blee.name <% end %> end It looks like the xml_builder template can''t expand the erb tag. It this not the correct way to expand and xml template ? Thanks ! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Jul 15
0
Writing test for CacheHelper
Hi, I''m working to patch actionpack/lib/action_view/helpers/ cache_helper.rb so that it doesn''t throw when ouput_buffer isn''t ActionView::OutputBuffer but is still html_safe. In 3-0-stable the function contains the following if: if output_buffer.is_a?(ActionView::OutputBuffer) safe_output_buffer = output_buffer.to_str fragment =
2007 May 29
4
cache everything but...
I saw this older post when searching for information: On Feb 16, 5:10 pm, Ingo Weiss <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > withfragmentcachingonecancacheparts of a page. However, more often > than not what I would need is the exact opposite approach. I would like > to be able to use action cashing and have a mechanism for telling Rails > to
2007 Jun 26
0
Best way to render KML files using RXML templates
I want to produce google maps KML files which are baiscally XML files with a KML extention. I''m using restful routes and respond_to. The best way I''ve found is to use respond_to do |format| format.kml { render :action => "kml" } will render a kml.rxml template I have but really I want to have action.rxml rendered for kml files. Is there are way to acheive this,
2007 Jul 22
1
html.erb and textmate. Cant get snippets to work.
Hello! I moved to html.erb but the snippets fail to work. eg .rhtml lia(tab) gives me link_to .html.erb lia with a tab after it =) I have tried the comment suggested here: http://ryandaigle.com/articles/2007/2/21/what-s-new-in-edge-rails-rhtml-and-rxml-to-die-a-slow-and-painful-death David Demaree: " 1. Select Bundles > Bundle Editor > Edit Languages... from the menu bar. 2. Find
2007 Sep 29
1
templates with same name before extension are cached
Hi all, I was just wondering if this is the intended behavior. Here is my setup: controller def index respond_to do |f| f.xml { render :xml => true } f.html { render :layout => :none } end end In my views I have a file for each type index.herb index.xerb The first request I send is cached and interferes with the other one. For example, if I send an xml request
2010 Nov 04
0
Re: Train wreck getting render_to_string to work from foreign controller [SOLVED]
Just for collective knowledge as I have found no info on this problem online: I solved this by adding an .html.erb file for the "missing template", since by design or bug Rails3 will not find or render another controllers view (in my experience). Then in the new html.erb file, I just put <%= render "comparisons/display" %> because the views *are* able to find templates
2009 Apr 22
1
how can I get the friends of a fb user only using his facebook id
hello, with facebooker can I get a list of someone''s facebook friends, only using his facebook id? If yes, then please let me know how... (and don''t read further) If this is not possible, then here is my problem: ------------------------------------------- I have a flash movie embedded in the canvas page of my Facebooker application. The movie gets information from an xml
2006 Nov 07
0
rxml template accidentally rendered within html layout
Hi, I have the following in my controller: def show @quest = Quest.find(params[:id]) respond_to do |format| format.html format.xml end end And in my routes: map.resources :quests I have two views for this action, quests/show.rhtml and quests/show.rxml. Now what I would expect as a response to ''/quests/1.xml'' is that Rails sends, as XML, the rendered rxml
2008 Apr 20
1
Why is respond_to always rending the RXML view?
I''m having a problem in Rails 2 where respond_to is always rendering the RXML view even in the HTML rendering response. Can anyone tell me why this might be happening? Here''s a code snippet: respond_to do |accepts| accepts.html accepts.xml { render :action => ''show.rxml'', :layout => false} end If I change this to the following it works fine:
2005 Dec 19
1
Preserving fallback with RJS
Hi guys, I really like RJS. I think they''ll replace partials in alot of instances. Unfortunately, because they''re automatically used like .rhtml and .rxml and are hard to specifically specify it makes it messy to preserve fallbacks when using them. For instance, using partials instead of rjs, my create method might look like: def create post = Post.new(params[:post]) ...
2007 Aug 29
11
Non-Erubis Templates
Trunk Issue: Because of the use of ''autoload'', template handlers other than Erubis are not loaded automatically (Haml, XMLBuilder). Either this should be fixed, or the documentation should be updated to instruct people how to use non-Erb template engines. Apparently the solution is to do something like this in merb_init.rb: ::Merb::AbstractController.register_engine
2006 Dec 12
2
RXML partial question
All, I have a RXML template which renders partial RXML templates within it. A snippet is below. The "xml" variable is the parent template''s Builder variable. It is passed into the partial under the name "parent_xml". Why can''t I use :locals => {.... :xml => xml ....} in my call to render the partial? It seems like if I do use :xml => xml, it
2006 Nov 04
0
mongrel cluster and rails cache.
Hi, I was just wondering, how does a Mongrel cluster maintain Rails cache consistency? For example, how does fragment caching work for multiple mongrel processes? Does the read_fragment(...) function in rails have a locking mechanism? Also, if there''s a Rails cache, how is that synchronized across multiple mongrels? Thanks, Sam -------------- next part -------------- An HTML
2006 Jan 05
0
Subdomains - redirect to different actions?
Hey, I''m trying to figure out what the most elegant way to do this - I''ve only got a small amount of different subdomains corresponding to categories - and I''ve been using fragment caching. In particular, I was wondering what the best way to call these actions is - I''m thinking redirect and render_component aren''t really very nice
2006 Jan 27
1
Caching from screen scraping
Hi all, I need to do some screen scraping from my rails app. Given an ethernet (MAC) adress, I scrape results from an internal web page that returns location and hostname. How can I cache the result from that screen scraping as to be polite to the scrapee? I would like to expire the results daily. In perl, I would use Cache::File. Can I use rails caching for this? What''s the best
2005 May 01
5
Example using Builder::XmlMarkup and .rxml files?
Greetings, I''m a newby to both "R"s in RoR. I would like to use Builder::XmlMarkup to generate my pages. If there is a working downloadable example somewhere, that would probably be enough. Otherwise, here''s what I want to do: With the following controller: class AccountsController < ApplicationController layout ''accounts'' model :account
2006 Jul 20
2
Why is my rxml view being wrapped by the rhtml template in views/layouts?
Why is my rxml view being wrapped by the rhtml template in views/ layouts? I was experimenting with REST, I had a nice little test program with one table: ''resources''. Here''s what the show method looks like: def show @resource = Resource.find(params[:id]) respond_to do |accepts| accepts.html accepts.xml end end I have a show.rhtml
2006 Sep 26
0
Is it possible to render RXML partials in RHTML templates?
I have a RHTML template and I would like the output of a RXML partial to be embedded within it. When I do <%= render(:partial => ''list_edit'') %> where there exists a _list_edit.rmxl file, I get XML parsing errors in the browser - I believe because the partial is causing the rendered content to be identified as XML instead of HTML. Is there any way to