search for: codevad

Displaying 20 results from an estimated 24 matches for "codevad".

Did you mean: codepad
2008 Jun 07
3
Match render :nothing
...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 Jun 07
2
rcov causing a segmentation fault on rspec 1.1.4 and rails 2.1
...ve_support/core_ext/module/introspection.rb:60: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux] Is there any way to fix this? I''m using rspec 1.1.4, rcov 0.8.1.2.0, rails 2.1 and Ubuntu Linux 8.4. -- 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 =>
2009 Feb 18
4
expire_fragment with memcached
Hello all, We know that memcached or memcached-client doesn''t support regex... But It seems it doesn''t support expire_fragment either :/ I''m trying to use expire_fragment with memcached as following : expire_fragment(:controller => ''home'', :action => :list_posts) But apparently it''s not supported by memcached : RuntimeError (Not
2008 Oct 11
1
Re: time_ago_in_words is off by a day
...accuracy), even though I don''t care > about the time, only the actual date? > > If it matters at all, I am using Postgres as my database. > > Thanks for any help. > > - Wayne > > > -- Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) João Pessoa, PB, +55 83 8867-7208 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.g...
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"
...be? Rspec gems are 1.1.11 and we also have the same gems installed in the app as plugins. My machine is a "Linux linux-fof0 2.6.25.18-0.2-default #1 SMP 2008-10-21 16:30:26 +0200 x86_64 x86_64 x86_64 GNU/Linux " - Maur?cio Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
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,
2007 Aug 23
0
active scaffold polymorphic model
...params[:record][:item_id] it works. I have found in the documentation that only whitelisted fields are saved, however, I did include :item_id in the config.columns... I would appreciate it if anyone can provide some insights as to why the item_id isn''t saved correctly. Regards Ivor www.codevader.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group,...
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 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"
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 =>
2009 May 06
0
Setting config.action_controller.relative_url_root isn't working
...r.relative_url_root = "/de" When i try to view the http://localhost:3000/de page it gives me a "Routing Error", but if I try http://localhost:3000/ it works perfectly. Any idea about what this might be? - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
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 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''
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
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