similar to: ActiveRecord:

Displaying 20 results from an estimated 2000 matches similar to: "ActiveRecord:"

2006 Jan 02
1
ActiveRecord, << or push_with_attributes: update if exists?
In the Agile Rails book, on page 232 (PDF, 4th edition) there is an example of (within ActiveRecord) marking an article as read by a user at the present time. Short example code (from the book) here: class User < ActiveRecord::Base has_and_belongs_to_many :articles def read_article(article) articles.push_with_attributes(article, :read_at => Time.now) end # ... end
2006 Apr 29
5
HABTM - how to insert join row when associated rows exist
I have successfully used HABTM to create a many-to-one-to-many set of rows in one step. Now, if two objects I want to associate already exist, how do I create the join row? The Agile book mentions the ''push_with_attributes'' method. The text says this method is useful for adding additional attributes to the join row (in the example a ''read_at'' timestamp). I
2006 Feb 21
7
Self-referencial habtm relationship
Heyo! I am setting up a self-referencial habtm relationship with the users of my app. I am using Chad Fowler''s "Rails Recipes" to get me started, and everything works great with the join table "people_friends". I add friends by doing somebody.friends << somebodyelse. However, with my app, there is an approval process so my join table has columns person_id,
2005 Dec 15
2
efficient INSERTS
Hi, I''ve got the following models: Company Package with a habtm relationship. In my controller, I have a ''dispatch'' action which does the following @companies.each do |company| @packages.each do |package| company.packages.push_with_attributes(package, :sent_on => Time.now) end end my table ''companies_packages'' therefore lists which
2005 Dec 19
15
OpenSSL ''no ciphers'' error on OS X when using Net::HTTP
OpenSSL::SSL::SSLError: SSL_CTX_new:: library has no ciphers This error is thrown whenever I use anything that uses Net::HTTP. OS X Tiger, ruby 1.8.2 (2004-12-25) [powerpc-darwin8.2.1] What could it mean? Joshua Sierles
2006 Mar 09
11
syncPEOPLE on Rails TextMate Bundle 1.0 & Screencast
The 1.0 version of our bundle is now available for download, along with a 10 minute demonstration of it in use. See http:// syncpeople.com/downloads. == What is syncPEOPLE on Rails? == syncPEOPLE on Rails is a bundle of snippets, macros and commands for TextMate that make Rails development on the Mac even easier. Generate scaffolds, migrations, models and controllers from inside the
2005 Dec 31
4
How might I use file_column for incoming email attachments?
I''m writing a ''Mailman'' model that catches emails sent to my application (kind of like backpack, I think). The trouble is that I''d like to save image attachments in the same was that file_column saves them--in fact, I''d really like to use a simple assignment like photo.image = attachment to save the image in its proper place. However,
2006 Jan 03
14
Family Connection 0.9
Family Connection is an easy-to-setup online hub for your family that includes a Family News section, and an Address Book. Currently, there is no documentation on installing the Rails application itself (hence the 0.9 version number). Once installed, Family Connection guides the family website administrator through a simple two-page setup process. The web application restricts access
2006 Feb 11
9
Textmate Backtracer 1.0
Originally posted at http://blog.inquirylabs.com/2006/02/11/textmate- backtracer-10/ == Announcing Version 1.0 == The backtracer has been around for a while now, and seems to have done its job well enough to deserve a 1.0 mark. == What Is It? == Whenever a Rails exception occurs, it spits out a backtrace full of filenames and line numbers. I?ve often thought, ?Wouldn?t it be nice if I
2006 Apr 26
2
MASC = A New Way to Use Textmate Snippets
Just thought I''d announce this on the Rails list since I know several of you use Textmate: there''s a new feature I''m calling "Multiple Arbitrary Simultaneous Carets" or MASC for short, which is available in my personal TM bundle. It''s been handy enough for me that I thought others might enjoy it.
2006 Jan 08
10
Resource Bundle Roundup
I''ve recently made a first release of what I''m calling "bundled_resource" which is a plugin that makes our lives *much* easier when we need to use javascripts, stylesheets and images in conjunction with one another to deliver a special effect or tool on the client (browser) side. If you missed the release, read about it on my blog at
2005 Dec 19
7
How about a forked session supervisor in dispatch.fcgi?
I was talking to a friend of mine who''s developing PHP on trax and we came up with a solution to the ruby session file problem. I''m not sure if this idea has come up before, so I wanted to run it by everyone before making any code contributations and/or talking to the Rails core about it. It seems to me that the current situation we''re in with regard to
2006 Jan 27
4
find.collect problem.
Hi all. I am trying to populate a dropdown based on two values. def self.clientref( reference ) @bugclientrefs = self.find_all(["bug_id = ?", reference]).collect {|b| [ b.client_id.strip << " - " << b.client_ref.strip ]} end This works fine. However this returns the reference to the client. I want the full name using this function. class Bugclient <
2006 Apr 27
5
ColumnComments Plugin
Here?s a small plugin that may be useful for documenting your database. Based on Dave Thomas?s AnnotateModels plugin, this plugin goes one step further and allows you to store comments on each column in the database (MySQL only). Full write-up at: http://blog.inquirylabs.com/2006/04/27/ columncomments-rails-plugin Subversion at: svn://syncid.textdriven.com/svn/opensource/
2006 May 24
10
[ADV] Announcing FamilyAnywhere.com
Hello Railers, At the beginning of this year, I announced Family Connection, an open source, free, and easy-to-use family website built using our darling web app framework, Ruby on Rails. Now it?s available as a hosted, very easy-to-set-up web app called Family Anywhere! It has the same Family News and Address Book features as the original, plus a new Photo Album that lets you browse
2006 Jan 04
9
Family Connection 1.0
This is a follow-up announcement from the 0.9 release. There are no major changes, but this release marks a downloadable (tgz) file as well as a promotional website, a demo application and screenshots. Family Connection is an easy-to-setup online hub for your family that includes a Family News section, and an Address Book. http://familyconnect.rubyforge.org/ Please note that the download
2006 Jan 28
13
What''s the verb form of id?
Random question: I''ve written a method for the String class that turns an arbitrary line of text in to an identifier, e.g.: "My, what a beautiful day!" => "my_what_a_beautiful_day" "(anb*#NF(AMNV" => "anb_NF_AMNV" We''ve got all these great names already like underscore, classify, titleize and things like that. I''d
2006 Jan 27
17
Is it just me, or is Ruby exploding?
I am being barraged with Ruby, Rails and Rich Internet application work right now. Almost enough that I could quit the day job and make a go of it, forgetting about Java altogether. Places in the greater Miami area are turning on to Rails and Ruby -- much of it fueled by the stronger voices in the local Java community. Am I alone in this, or do many of you see absolutely explosive growth in Ruby,
2006 Jan 04
3
HTTP 500
Hi. I am faced with a problem that has been described in other emails. The proposed solutions don''t work for me, and as I am stuck with it now for several hours, I ask here. I am running RoR 1.0 and Ruby 1.8.2 on SuSE Linux 10.1 and WEBrick 1.3.1 and following the tutorials in Agile Dev. With RoR. Since a few changes all my requests return Http 500 Internal Server Errors. The logs
2006 Feb 19
3
"syncPeople on Rails" Bundle 0.7 Released
This has been such a fun project. Couldn''t keep myself away: http://blog.inquirylabs.com/2006/02/19/syncpeople-on-rails-07/ == Summary == Easily navigate between ActionMailer models, views, partials, controllers, helpers, javascripts and stylesheets with a single key (keypad ''enter'') in TextMate. This release also adds an Enhanced TODO List (ctrl-shift-t) and