[Rails] [Asset pipline]MD5 hash, does it affect on Google?

2012-08-12 Thread Jeroen van Ingen
As described here: http://www.suffix.be/blog/asset-pipeline-production The MD5 hash in images is used for browser caching. But I was wondering if it affects your page ranking in Google. I coudn't find anything about it. Does anyone know if the MD5 hash in your assets in production affects your

[Rails] Re: [RESQUE]Question about queues

2012-05-23 Thread Jeroen van Ingen
My queues consists of jobs with different arguments. resque-lock is mentioned to add just one job per queue. That isn't going to work, because I have different jobs for one queue. resque-loner is mentioned to have one unique job on the queue. That is not my problem, My problem is that a job of

[Rails] Re: [RESQUE]Question about queues

2012-05-22 Thread Jeroen van Ingen
I just searched through the Resque plugins available at https://github.com/defunkt/resque/wiki/plugins but I can't find a plugin that fit my needs. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gro

[Rails] [RESQUE]Question about queues

2012-05-22 Thread Jeroen van Ingen
I run Resque with x 'general' queues. With 'general' I mean a queue that may run every type of Worker. Or in the Rake command: COUNT=x QUEUE=* rake resque:work When a worker runs a job of a specific class, it may not run another job of the same class simultaniously. This job has to wait until the

[Rails] Re: [Arel]Building query, but can't get a proper output

2012-03-13 Thread Jeroen van Ingen
Right... stupid me... Thanks anyway ;) -- Posted via http://www.ruby-forum.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@googlegroups.com. To unsubscribe from this group, se

[Rails] [Arel]Building query, but can't get a proper output

2012-03-13 Thread Jeroen van Ingen
I have the following code: advertisements_arel = Advertisement.order("advertisements.id DESC").arel @advertisements = (params[:website_id].present? ? advertisements_arel.where(:website_id => params[:website_id]) : advertisements_arel).to_a It returns a struct Arel::SelectManager::Row

[Rails] Re: HOWTO Let Rails login into another website

2011-11-14 Thread Jeroen van Ingen
Mechanize looks good, I'll definitely give it a try. Where I'm basically searching for is a gem or library that can store a session / cookie, so Rails can login on a website in the background. Anyone who know if there are other options besides mechanize? -- Posted via http://www.ruby-forum.com

[Rails] HOWTO Let Rails login into another website

2011-11-14 Thread Jeroen van Ingen
Hi guys, I use Nokogiri to fetch some HTML pages and scrape it in the background. So far it works fine. But now I have to login to view some other pages in the background. How can I login in the background to fetch some HTML? In other words how can I login in the background using Rails? Note that

[Rails] Translate month name

2011-09-07 Thread Jeroen van Ingen
I have translations downloaded from https://github.com/svenfuchs/rails-i18n Things like I18n.l(Time.now, :format => :long) works fine. It returns '30 août 2011' for example if I set I18n.locale = :fr. My problem is as follows. I have a date with a french month name like '30 août 2011'. '30 août 20

[Rails] Re: polymorphic association

2011-09-04 Thread Jeroen van Ingen
I think you're adding only book_images and no author_images at all. But I'm nbot sure, because you're not providing your code Try something like this: @asset.imageable = @author or AuthorImage.create attributes I don't know if you made the right decision with using polymorphic associations. You

[Rails] Re: Best form in pulling the last two records from a dataset in active record

2011-08-28 Thread Jeroen van Ingen
Create a named_scope (scope in Rails 3) like this: scope :secondlatestpost, :limit => 2, :order => :published_at Then declare it as follows: BlogPost.secondlatestpost BTW IMHO the method name 'secondlatestpost' is a little long. I should take a name like BlogPost.latest -- Posted via http://ww

[Rails] Re: Error with errors

2011-08-28 Thread Jeroen van Ingen
The way you want to display the errors looks cumbersome to me. But maybe you have a good reason to do it this way (Actually I'm curious why you do it this way). Why don't you do it the 'regular' Rails way with f.error_messages? Note that this method is not available in Rails 3 anymore. You have

[Rails] [Cucumber]Which example fails??

2010-11-10 Thread Jeroen van Ingen
I have the following test: Feature: Test the login for all roles In order to login As user I need to provide my password and username Scenario Outline: Test login for role Given user should exist with email: "t...@test.nl", name: "tester" And the user with email: "t