search for: seespotcod

Displaying 20 results from an estimated 20 matches for "seespotcod".

Did you mean: seespotcode
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 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 Jun 21
3
Simple range question
I have a model with a datetime field called start_date. I''d like to do a find on the model so that it returns only records with the start_date equal to the current day. Something like this: @foos = Foo.find(:all, :conditions => //?? start_date equal to today''s date ??// ] ) Thanks in advance for any help. -------------- next part
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 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
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 Nov 24
0
PostgreSQL search_path and db:structure:dump rake task
...ma.) http://dev.rubyonrails.org/ticket/6665 While I''ve tested the regex pattern used to check for multiple schemas, I''m unsure of how to properly write tests to be included in the standard Rails test suite. Any advice would be appreciated :) Thanks! Michael Glaesemann grzm seespotcode net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonr...
2007 Oct 12
1
database configuration specifies nonexistent postgresql adapter
Hi I am trying to get RoR to work with Postgresql 8,2.5 (latest stable version) Steps taken 1. Download Postgresql 1.82 and installed successfully 2. Edited my Database.yml development: adapter: postgresql database: test_development username: postgres password: xxx host: localhost test: adapter: postgresql database: test_test username: postgres password: xxx host: localhost
2006 Jul 14
3
postgres migration notices
When I run "rake" using a postgres 8.1 database, I get a bunch of these notices. NOTICE: CREATE TABLE will create implicit sequence "categories_id_seq" for serial column "categories.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "categories_pkey" for table "categories" How can I avoid those? I take it I need to modify the
2006 Dec 02
2
select some columns only when doing "find"
Hi, I love ActiveRecord and its simplicity. Person.find(1) It''s so simple but imagine if the table people has 30 columns and there are some columns with type ''bytea'' (or large object / binary data) holding MB-s data, then you only need three columns only with type ''string'', ''string'', ''int''. It''s a waste of
2007 Jun 19
2
sequence name prefix
In Postgres, I use different database schemas for each application, by declaring, e.g.: class ApplicationController < ActionController::Base ActiveRecord::Base.table_name_prefix = "keywords." end I assumed that the sequence names were also prefixed with the database schema names, e.g. keywords.things_id_seq But Rails 1.2.3 assumes the sequence is *NOT* in the same schema as the
2007 Aug 07
4
Howto use ENCRYPT() function of MySQL
Hi all, I''m working actually on a Control Panel to manage a mail system. Until now, when I create a new mail account, i do an insert and protect the pasword with ENCRYPT(''password'') function. I can''t change the method to SHA1 or MD5 because the SMTPd a IMAPd will not support it. Can you explain me how to force RoR to rewrite the INSERT SQL query and use
2007 Jul 31
3
country listbox from table
sorry again, i''m building a registration form, getting stumped on the country listbox. any ideas how i could build a listbox for countries, taking it''s content from a data table? i''d imagine i''d have to generate a data model for country, fill it in with all the current ISO spec countries; that i can do. then tie that data model to the account controller.
2006 Jun 24
8
PostgreSQL on Mac?
Is there something like MAMP, but uses PostgreSQL instead? I found a couple PostgreSQL dmg''s, but one was < 8.x. For those who use PostgreSQL on Mac, how''d you install it (fink, package, please don''t say compile!)? Thanks, Joe -- Posted via http://www.ruby-forum.com/.
2007 Oct 15
6
SQL injection with :order, :limit, :group
I know how to avoid SQL injection attacks when you use :conditions User.find :first, :conditions => ["login=?", params[:username]] but how about with :order, :limit or :group? # uh-oh...spaghetti-oh User.find :first, :order => "login; delete from users; select * from users" Pat --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2007 Jul 19
8
Where do I put code for my own types?
Sorry for all the questions today... Beyond the obvious things--models, controllers, helpers, and other framework-related types--where should I put the code for my own types? For example, I was thinking of writing my own AJAX-friendly paginator, but I don''t know where to put the code for that sort of thing. I would prefer to keep things object-oriented, so I would rather do a lot of
2006 Jul 03
13
Remote Postgres is driving me crazy!
Hi guys, I need your help. Here is my database.yml: development: adapter: postgresql database: db username: username password: mypassword # Connect on a TCP socket. Omitted by default since the client uses a # domain socket that doesn''t need configuration. Windows does not have # domain sockets, so uncomment these lines. host: 192.168.22.1 (this is a remote ip in
2006 Jul 01
8
Seeking Advice on Pattern for Multi-Organization Application
I am the developer of FreeMIS - an Open Source management information system for schools. It currently holds the data for one school - so different schools host different instances of FreeMIS. I would like to expand the domain of a single instance of FreeMIS, so that it covers all the schools in an education authority. THis will enable me to implement authority-wide functionality. Is there
2006 Jun 30
50
Time To Pick the Mongrel BUGS Mascot!
Bradley Taylor shot me this *goldmine* of ugly ugly ugly dogs: http://www.sonoma-marinfair.org/uglydogvote.shtml I *have* to use one of these for the Mongrel BUGS Mascot. He''ll go on our bug list page and replace the little beetles on the left. Pick the dog you think best represents a lovable but defective pooch and reply to this with your +1. Let the voting begin! -- Zed A. Shaw