search for: jeffcole

Displaying 12 results from an estimated 12 matches for "jeffcole".

2006 Aug 04
2
how to remove ID from stylesheet_link_tag?
When I use stylesheet_link_tag, the results come back with a timestamp ID, like this: <link href="/stylesheets/style.css?1154009736" media="screen" rel="Stylesheet" type="text/css" /> I don''t want the query string and ID on the end, but I can''t see how to disable this in the docs. How do I do this? thanks, jeff -- Posted via
2006 Jun 22
1
error messaging for a form without ActiveRecord model
I have a form that has no ActiveRecord model behind it, it is just composed of random fields like "email_address", "email_body", etc. Even though there is no model, some of these fields are required, and I would like to use the built-in Rails methods for automatically showing errors in the form. Unfortunataely, I can only see how to do this if the form is based on an
2006 Jul 12
1
flash object not clearing?
My flash object stays persistent even after I redirect to the next page. For example, I may set flash[:foo], then redirect to /bar, which successfully shows the flash[:foo] field. But if I then click on another page that also displays flash[:foo], it shows the same contents from the prior page. The flash[:foo] field persisted past the first page redirect. but I thought it was supposed to
2006 May 25
3
caching of javascript and stylesheets
Is there a standard way to make sure a client''s web browser pulls the latest version of your style sheet or javascript file instead of using a cached one? We are currently using a tedious way where we add a version number to the file (e.g. screen-v12.css) and when Rails boots up it finds the latest version in the style sheet folder. On the other hand, I have seen Basecamp append
2006 Jul 14
3
override to_string for single attribute?
I have a model where I want to change the display for a single attribute such that if the value is an integer, it displays with no decimal point (e.g. "1"), but if it is non-integer, it displays with a decimal point (e.g. "1.25"). The easiest way to do this seems to be if I could override the to_string method for my_model.my_attribute.to_s. Is there a way to do this? Or
2006 May 15
0
ActionMailer for bulk emails
I am using Postfix as my mail handler. When I have ActionMailer deliver a large number of emails, it takes a while. It seems that in my Rails process, ActionMailer waits for Postfix to actually send each message before returning and moving on. Is there a way to configure either ActionMailer or Postfix to speed the sending of bulk mails, perhaps by having ActionMailer just submit the mail to a
2006 Mar 07
4
transaction question
How does one set up a transaction for multiple models? For example, how do you wrap the entire logic below in one transaction? #begin transaction for bar in foo.bars bar.something += 1 bar.save end foo.something += 1 foo.save #end transaction For even more complexity, what if a mail notification is sent for each bar modified in the collection? thanks, Jeff -- Posted via
2006 Feb 08
0
two authenticated users simultaneously in same browser
What is a good solution for the situation where someone logs in to your site in their same browser as a second user (say in a new tab) without logging out the first user? When they go back to the first tab, they expect to be browsing as the first user, but because the user authentication is valid for the whole browser, they are really browsing as the second user. There is potential here
2006 Jun 19
2
fuzzy search
This may be offtopic to Rails, but what are people doing to find records based on fuzzy string matches? For example, if you wanted to find a Person with name "David Heinemeier Hansson" but searched using the string "Dave Hansson". Currently I am find_by_sql that calls the PostgreSQL function "levenshtein(string1, string2)" which returns results with a score
2006 Aug 01
2
tab characters with Rails 1.1 on Windows
We just upgraded to Ruby 1.8.4 and Rails 1.1. It works fine on my Mac OSX, but in Windows, Rails spits out errors like "Invalid char `\002'' in expression". Apparently, Ruby or Rails on Windows has a problem parsing tab characters. This seems to be a common problem: http://softiesonrails.com/articles/2006/04/27/spaces-not-tabs However, the only recommended solutions seems
2006 May 23
8
ad-hoc query
How do you run an ad-hoc query that does not belong in any model? I thought it was something like ActiveRecord::connection.find("my query..."), but I can''t seem to find the documentation on it. I know I''ve seen it somewhere before, though. thanks, Jeff -- Posted via http://www.ruby-forum.com/.
2006 Jan 26
21
pagination_links help
I want append custom query parameters to my pagination links, like ?page=1&foo=bar. I can''t quite figure out how to do this with the pagination_links helper, although I believe the API says you should be able to: pagination_links(paginator, options={}, html_options={}) options are: :params: any additional routing parameters for page URLs Has anyone tried this? thanks, jeff --