similar to: Simple range question

Displaying 20 results from an estimated 900 matches similar to: "Simple range question"

2006 Aug 03
5
Multiple Loading events in form_remote_for
Is it possible to have multiple loading events in the params for form_remote_for? I''d like to do this :loading => "Element.show(''form-indicator'') and this :loading => "Element.hide(btn-submit'') Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Aug 10
2
search acts_as_taggable for multiple tags
Hey...I''m trying to search a Model that uses acts_as_taggable for multiple tags. I''d like to pass in a search string containing a space delimited tags names (i.e. "tag1 tag2") and return the objects that have been tagged by either one of those. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jul 11
18
Zip Code Ranges
Does anyone have any recommendations for working with zip code distance ranges? I need to calculate the distances between US zip codes. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060711/f133d7de/attachment-0001.html
2006 May 18
7
Ruby Before Rails
As I, like many people, are coming to ruby in the rails era, I''m curious about how Ruby Web Dev was done prior to rails. Any veterans want to share their insights? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060518/20cde24d/attachment.html
2006 Jul 12
2
37 Signals - Music
So I''ve heard the 37 signals guys mostly work from home - but when you''re in the office, do you guys listen to music? If so - what kind of stuff do you play? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060712/14e7f63c/attachment.html
2006 Jul 24
1
Dev Web Server Setup Suggestions?
I inherited a PC that I''m turning into a *NIX web server for in house development. Its primary purpose would be for staging, before apps were released to a shared-hosting environment. I''m probably going to setup Apache 1.3/FastCGI to match where the site is currently hosted. I develop in Windows, but I really want to get more familiar with the command-line linux environment.
2006 Jul 31
1
Grouping arrays in the View
I remember reading something awhile back about an easy way to work with object arrays in views. Say I want to arrange 20 images objects in rows of 3. I have a collection of @users, where each user has a user.thumbnail_url image. Is there some way to split these up so that they can be easily parsed in rows of three? Thanks, Nathan -------------- next part -------------- An HTML
2006 Jul 21
3
[Slightly OT] CSS with wildcard?
Sorry if this is a simple question, I''m a CSS noob. I have a rails app that is displaying posts, I am having it generate each post with its own div like "post_19", "post_20", etc. I could make it so it puts another div around that div (i need the individual post div''s for deletion with AJAX) but would rather not. Is there some way to use CSS to do
2006 May 21
3
find with belongs_to -> belongs_to -> belongs_to
I have 3 tables keywords (keywords attached to a file) files (info about the file) paths (path for the file) [This is a legacy database, so I can''t change this] keyword belongs_to file and file belongs_to path. Users need to be able to search the keywords, but they only have access to certain volumes, so the results need to be limited by the path. I also need to show paging,
2006 Jul 26
15
Rails without a primary key
I''ve been trying to use Rails on a database where the biggest datawarehouse-style table doesn''t have a primary key. It really doesn''t make sense and just adds extra unnecessary space. I do have, however, a column that I normally use to search on (IP) that returns many rows. The table also references several other tables through rails-friendly foreign keys. Simple AR
2006 Jul 25
2
Losing precision while copying interval type data (Postgres)
Hi I am trying to use active record to copy some data. One of the entry I am copying is type interval (Postgres); however, it lose some precision after I copied that column. Here is what I did: @newData.elapsedtime = @oldData.elapsedtime @newData.save Result: both displayed as 00:00:02.453 in the table, however, if I use the following command to convert its value into float ( SELECT
2007 Oct 09
5
Backticks wrapping SQL values in polymorphic associations...
Hopefully the subject line didn''t scare you. That said... I have a simple polymorphic relationship (is that possible?): class Part has_many :attachments, :as => :attachable end class Attachment belongs_to :attachable, :polymorphic => true end Calling Part.find(:first).attachments yields this SQL error: ActiveRecord::StatementInvalid: Mysql::Error: Unknown column
2006 Feb 28
5
Problem with paginate, include and foreign keys
Hi all, Solaris 10 Ruby 1.8.4 Rails 1.0.0 Postgres 8.1 postgres driver 0.7.1 I''m having a problem with getting paginate() to properly pick up an FK constraint properly. I don''t seem to have this issue with ActiveRecord, however. Consider: create table start_dates ( id bigserial, start_date date unique, max_slots int default 40, primary key (id) ); create
2007 Jul 08
2
datetime_select, is creating an instance of the Time class
Hello It seems that datetime_select, is creating an instance of the Time class. Why would that be? I found this while building a site where people can create vigils (prayer vigils, peace vigils, etc). When I added a validation method that compared start_date to created_at, it generated the error: ArgumentError (comparison of Time with DateTime failed): I was able to put a breakpoint in the
2006 Feb 28
1
Working with date_select ...
I am a little confused about the best way to work with date_select. I see that in my views it generates a simple input form that allows for the entry of year, month and date information. If I just leave it at that, great! But what if now in the controller, I want to work with the date information. I actually want to take the user input date and compute a new date some number of days in the
2007 Jul 09
5
Color coding table rows depending on an attribute
I need to show a different background color depending on the type of comment posted. The type of comment is determined from a drop-down selection. I figured the simplest way would be to do something like I have below, but I can''t seem to get it to work: <tr <%= puts ''"style = "background: red;"'' if comment.comment_type == ''Hiring
2006 Apr 15
2
Multi-parameter assignment
Hi, I''m trying to submit data from text boxes on a form to one variable in my controller, in the same way that datetime_select has date(1i), date(2i), etc for day, month, year, etc... I''ve named my variables event[start_date(1i)] event[start_date(2i)] and event[start_date(3i)] but this doesn''t seem to work and event[:start_date] is blank ... any pointers would be
2005 Mar 03
12
bug in postgresql ''now'' time handling??
line 212 of postgresql_adapter.rb is return Time.now.to_s if value =~ /^\(''now''::text\)::(date|timestamp)/ i don''t think this will work. in postgresql the field ''now'' is pinned to the SAME TIME for the duration of a transaction. eg. if you do begin transaction; insert into t values(42, ''now''); # sleep one minute
2007 Apr 09
1
help with ActiveRecord joins
I''m working on a fairly complex join query and could use a bit of advice from more expert users of ActiveRecord. I have an events table with quite a lot of data, with has_many relations to categories, age_groups, and event_images. In my first naive implementation, each event had a date, so to load all upcoming events efficiently, I''d do: Event.find(:all,
2007 Sep 11
2
How to search with range when I am using AAF
acts_as_ferret :fields => { :name => {:}, :desc => {}, :start_date => {} } def start_date self.start_datetime.strftime("%Y%m%d") end Now that I am strong start_date in YYYYMMDD format, I want to search for all event in between 20070506 and 20070809 What will my query look like when I am using aaf. This one doesn''t work