similar to: expire_fragment with memcached

Displaying 20 results from an estimated 1000 matches similar to: "expire_fragment with memcached"

2008 Jun 07
3
Match render :nothing
Hello guys, Is there any way to match a render :nothing? I coudn''t find any way to do this so i''ve just changed my controllers to do a "head :ok", but it would be nice to know if there is any other way :) -- Maur?cio Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) Jo?o Pessoa, PB, +55 83 8867-7208
2008 Oct 26
3
Undefined method f_title
Hi, This is my migration: class CreateSampleForms < ActiveRecord::Migration def self.add_data SampleForm.create(:name => ''Default (Empty)'', :f_type => ''Default (Empty)'', :description => ''Use this template to create a blank form.'') end def self.up create_table :sample_forms do |t| t.string :name, :null =>
2008 Jun 07
2
rcov causing a segmentation fault on rspec 1.1.4 and rails 2.1
Hello again :) I''m trying to run rcov on my specs here but i''m getting a lot of segmentation faults (and they usually happen at different places): /home/mauricio/NetBeansProjects/reeds/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:211: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux]
2008 Oct 26
2
use Prawn to generate pdf
Hello: when i use Prawn to generate pdf file for download, i got a blank pdf file, can someone tell me why? require ''prawn'' class DownloadController < ApplicationController def download_pdf send_data(generate_pdf, :filename => ''test.pdf'', :type => ''application/pdf'') end private def generate_pdf
2008 Dec 01
1
Undefined method "full_description" when trying to run "rake spec"
Hello guys, I''m getting this weird error when trying to run the specs using "rake spec": /home/mauricio/NetBeansProjects/talkies/vendor/rails/actionpack/lib/action_controller/test_process.rb:471:in `method_missing'': undefined method `full_description'' for #<Spec::Rails::Example::ControllerExampleGroup::Subclass_73::Subclass_9:0x7f5fdca4a810>
2009 Apr 08
4
Having trouble extending a class from a Rails plugin
I have class in a plugin that I want to crack open and add some functionality to for a particular application. So, I created a file by the same name as the class in my app/models folder and added some methods to the class, but, I can''t seem to get Rails (2.2.2) to pick-up the extended definition. I did find while trying to debug the problem that if I paste the extended definition into,
2009 Jan 10
2
hidden_field_tag flattens my array for value
ERB: <%= hidden_field_tag(''users_ids'', @users.collect(&:id))%> OUTPUT: <input id="users_ids" name="users_ids" type="hidden"
2007 Oct 21
4
Making 'expire_fragment' available to a model?
I noticed a lot of repetition across different Sweeper models in my app expiring the same fragments and so have been trying to move all the expire_fragment calls into another model which the sweepers can then use but it''s not working as I''d hoped.. I''ve created a CacheDestroyer model and want to be able to call something to the effect of:
2008 Oct 11
1
Re: time_ago_in_words is off by a day
Look at your 1.day.from_now and see if it''s like this: Sun, 12 Oct 2008 02:45:42 UTC +00:00 If you also have the "UTC +00:00", it means that you timezone is the GMT (and I think that it isn''t your real timezone). For example, my timezone is 3 hours after the GMT, so the right timezone would be something like this: Sat Oct 11 23:48:41 -0300 2008 At your
2005 Nov 04
1
expire_fragment outside of a controller
I am trying to figure out a way to call the expire_fragment outside of a controller. I need to expire some fragments on a hourly basis. I have a Thread that every hour that will perform a task. The expire_fragment is located in the module ActionController::Caching::Fragments as an instance method. Do I need to mixin the model ActionController::Caching::Fragments into my class? Or is there
2008 Dec 24
1
Need help : Rails app unable to connect to Solr server
Hi, I am trying to integrate solr in ruby on rails application.For that i am using the plugin acts_as_solr and gem solr-ruby. My solr server starts successfully with command $ rake solr:start But when I try to add data from $ script/console , it says that it cannot connect to solr server at the corresponding port.Same is the result if i try the browser to link to http://localhost:8982/solr
2009 May 05
1
will_paginate problem
Hi all, I''m having a bit of a problem with displaying a blog list using the will_paginate helper. My code is: entries_controller: def index @entries = Entry.find(:all) @blog_entries = @entries.paginate( :page => params[:page], :per_page => 4, :include => :user, :order =>
2008 Nov 04
1
HAproxy not listening to all IP address
guys, i am trying to install HAproxy infront of my webserver. usually my webserver listens on port 80 and since we have 5 ip address serving 5 different sites on the same physical server the webserver listens to all these ips and proxy the traffic to the relavent app servers. now the problem is if want to loadbalance i should install HAproxy on port 80 and there lies the problem.
2009 Feb 17
1
cloning an already uploaded image using attachment_fu
Hi, I have an Image model that is attached to a item. The image was uploaded through attachment_fu. Now, I want to reuse the same image for a new item. I tried several tips found online. For example in http://danieloshea.com/articles/254-cloning-images # Create a clone of an image and it''s thumbnails. def create_clone c = self.clone self.thumbnails.each do
2008 Jun 07
2
When to send "post" and "get" in blocks.
Hi, I''m new to RSpec. I have a question about how to write controller specs. Here''s a code generated by scaffolding (with Rspec). def do_get get :index end it "should be successful" do do_get response.should be_success end it "should render index template" do do_get response.should
2009 Jan 13
9
Updating multiple databases at the same time
I have an application that is load balanced. I have a master database which I update once a day. Then I push the raw mysql files to all other servers so they are the same as the master. This works fine, but there are a few situations where I need all databases to update in real-time. What would be the best way to achieve this in rails? Here is an example of what I am trying to do. I want to
2009 Feb 21
4
problem with running rake db:migrate on a Rails app
Hi everybody, I am trying to get the Typo blog engine up and running in development mode but I hit the wall as early as running rake db:migrate: (in /home/tweisser/workspace/typo/typo) rake aborted! no such file to load -- spec/rake/spectask /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:in `gem_original_require''
2008 Sep 05
4
Java vs. Ruby on Rails
I wrote a blog post <a href="http://www.pardontheinformation.com/ 2008/09/java-vs-ruby-on-rails-it-is-dead-heat.html">Java vs. Ruby on Rails</a> that I thought you might enjoy. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email
2008 Dec 09
3
Problems with getting correct id from query involving two tables
I have a query that is intended to find all "transfers" based on a condition the uses a second table. In the controller, it looks like this: def find_protocols @transfers = Transfer.find(:all, :from => "transfers, protocols", :conditions => "transfers.protocol_id = protocols.id AND protocols.name = \"#{params[:protocol]}\"") respond_to do
2008 Dec 19
3
Recommended way of restricting action permissions?
Hi, I just have a "best practices" question. I''d like to block users that don''t own a particular resource from performing edit/update/ destroy actions on it. Here''s how I currently do it: ## User has many resources, of different types ------- resource_controller.rb ------- before_filter :require_ownership, :only => [:edit, :update, :destroy] ... public