similar to: Overloading and wrapping an association method

Displaying 20 results from an estimated 6000 matches similar to: "Overloading and wrapping an association method"

2008 Oct 28
7
aasm callback order?
Hello! Sometime ago I ran across a webpage where someone had identified the full callback sequence for an object lifecycle including AASM with it''s :enter and :exit and whatnot callbacks. Unfortunately, I can''t find it and searches don''t seem to help. Does anyone have a reference to a page that shows the callback sequence with Acts As State Machine (the gem)? I think
2008 Apr 16
3
Linking to "Next Entry >>" from the current Entry Page
Hi all, I''m trying to link to the "Next Entry >>" from the current entry page (in show.html.erb). Any one know how I would do it? -- 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
2003 Oct 01
1
hypergeometric & population estimates
"help" We want to estimate the number of caribou in Jasper. We recently conducted an aerial survey and saw 70 uncollared caribou and 8 of 11 collared caribou. We want to estimate the number of caribou in this population with 95% confidence limits. Gary White uses the hypergeometric distribution and determines the population estimates using maximum likelihood and 95%CL as
2009 Mar 06
5
ActionMailer Layout on HTML version not Plain Text
I''m sending plain text and html emails by having multiple files for each email I send. For example, for my registration email I have a registration.text.plain.erb file and a registration.text.html.erb file. I want to use a layout for the html version of my emails. In my mailer I put: class AccountsMailer < ActionMailer::Base layout ''email'' ... end
2009 Mar 26
1
Turning off the layout in ActionMailer?
So I''m happy to see that ActionMailer supports layouts now (it may have for a while, but I just now realized it). But I don''t see a way to turn them off selectively or by multipart type. For example, if I have a layout that''s really simple in "layouts/ email.html.erb": <div style="border:1px solid gray"> <%= yield %> </div> I
2007 Jan 06
6
PXE stack access via com32
Hi, I've checked the archives for my issue, and while there is relevant discussion, the problem the original poster was asking about didn't seem to have been resolved then either (~2 years ago). At any rate, basically what I'm trying to do is send (possibly receive) UDP packets via the PXE stack using the com32 API (using version 3.11 of syslinux). I have followed both the comboot
2008 May 15
13
ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models
Acts_as_soft_deletable is a rails plugin that provides the ability to soft delete or disable models. When models are destroyed, they will be archived so that they can later be restored easily. Its similar to acts_as_paranoid but uses a different approach that should make it a little more foolproof. See the README at the following url for a better description. github url:
2008 Sep 18
8
handling association changes? What's the best practice?
Hello all! I have a conundrum that I''m _sure_ someone else has already thought of and solved. How does one best handle the scenario of association object changes and data integrity? For example, if I have a standard ecommerce site that sells Products and people can have Orders and an Order has_many Products... then, what happens if Product #3 is part of Order #2 but at some point, the
2009 Mar 27
3
ANNOUNCE: Hirb - A gem enhancing your script/console
Hi, I''m announcing Hirb, a mini view framework which enables script/ console to provide custom views. Out of the box your activerecord objects come back as ascii tables. You can also configure your tree-based models to return as ascii trees: Numeric |-- Float |-- Integer | |-- Bignum | `-- Fixnum |-- Date::Infinity `-- Rational I''ve written two tutorials on
2008 Apr 11
2
Validating an ActiveRecord object and its has_many :through associations
Considering an object with several has_many :through => associations, what is the ''best'' way to handle validations? As an example: class Student < ActiveRecord::Base # some attrbutes like # :name # :grade # relationships has_many :students_assignment, :dependent => :destroy has_many :assignments, :through => :students_assignment has_many
2008 Apr 04
6
validates_numericality_of :not_equal_to
I have a situation in which I want to validate a number is not zero. Both positive and negative values are acceptable, just not zero. validates_numericality_of has an :equal_to attribute, but I don''t see a :not_equal_to. I have not yet been able to find anyone who has discussed this. I did find information about custom validators, so I am now using a custom validator to check the field
2009 Mar 20
1
Getting a Time Zone abbreviation from the full name?
There''s got to be an easier way... I am building an event manager and as part of it, the user selects the time zone of the event from a drop-down list using the time_zone_select helper. This is stored in the events table as a string. Because of legacy data which is stored in UTC, I want to keep the dates and times in the table as UTC but when I display it, I want to show the abbreviated
2003 Dec 29
6
CVS Closed?
Tried to DL using CVS this eve, and it says: Unknown host cvs.digium.com. Has Asterisk development stopped?
2004 May 04
1
spdep question
Dear list, (also sent to Roger Bivand, but perhaps somebody of you can help me also) I am trying to use package spdep for fitting an SAR model with errorsarlm. However, I am not sure how to make a valid nb object out of my neighborhood. As far as I have seen, there is no documentation for nb.object. I have done the following: class(pschmid$nb) <- "nb" # pschmid is a prab object as
2007 Nov 18
2
Trouble with asterisk-users mailman
I'm trying this again because the last attempt didn't go through (thus more or less proving one of the below to be true.) Jesse Molina wrote: > > Test123 > > My messages to this mailing list are disappearing. > > Is this list quietly being moderated? > > Have I been wrongly black-holed? > > SpamAssassin gone wrong? > > > -- # Jesse
2007 Jun 05
4
uninitialized constant RailsHandler::Dispatcher
Hello, I am running in to an error trying to run mongrel. The server starts but then trying to access any url in my application throws this error: calling Dispatcher.dispatch uninitialized constant RailsHandler::Dispatcher ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:477:in `const_missing''
2003 Jun 10
1
-u updating too liberally
Hey ho. I apologize for what must be a stupid question, but I couldn't find any relevant posts in the archives. I want a daily backup of my home directory to another machine. Because I never delete any file, no matter how bloody useless, my home directory is inordinately large. So, it is important that I only back up those files that really need to be backed up. Here is the command I have
2012 Jan 31
10
[Bug 45421] New: regression: nouveau.ko fails to load
https://bugs.freedesktop.org/show_bug.cgi?id=45421 Bug #: 45421 Summary: regression: nouveau.ko fails to load Classification: Unclassified Product: xorg Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: major Priority: medium Component: Driver/nouveau
2011 Jun 21
2
Re: [1.3.22]Steam "F.E.A.R. 3"-Crashes On Start-Here I
You can also update your nvidia graphic driver. Else you can wait my test Friday when Stean will unlock the game...
2008 Apr 10
3
New to ruby, Need help
I''m attempting to make a simple program, just combine two images and output a .jpg file. Here''s what I have: class PicController < ApplicationController require ''RMagick'' def index im1 = Magick::Image.read(''1.jpg'') {self.size = "81x81"}.first im2 = Magick::Image.read(''2-1.jpg'').first result = im1.composite(im2,