Displaying 13 results from an estimated 13 matches similar to: "ActionMailer does not find templates in production mode"
2006 Sep 15
2
Caching::Sweeper Access to Controller
Hello,
I''m running Mongrel 0.3.13.3, cluster 0.2.0, and Rails 1.1.6 and I
have a problem with a sweeper not having access to the controller
instance.
NoMethodError (undefined method `session'' for nil:NilClass):
/app/models/audit_sweeper.rb:16:in `log''
/app/models/audit_sweeper.rb:9:in `after_update''
2010 Apr 16
1
Active Record observers broken: can't be used for "before" callbacks
I was just wondering what about a report that I made almost 2 months
ago: Active
Record observers
broken<https://rails.lighthouseapp.com/projects/8994/tickets/4087-activerecord-observers-cant-be-used-for-before-callbacks>
I think it''s a pretty big bug. In Rails 3, creating an observer with a
"before_save" callback (for instance) will result in all observed models
being
2007 Jul 26
1
Lohan the observable
Sorry, that name is a misnomer. However, I was excited to find that Ruby
has a built in Observable module and I''m pretty bored, so I apologize in
advance....
require ''observer''
# one who is observed
class Celebrity
include Observable
attr_accessor :name
attr_reader :is
def is=(val)
@is = val
changed
notify_observers(self)
end
end
# one who
2005 Jun 25
2
observing a habtm association
Is there some way to observe when an association is added in a habtm
relationship?
I know I could turn the relationship into a model, but I don''t want to
give up using
:include in my finds...
joshua
2006 Oct 24
1
Locking issues when adding to the Index
Hi,
I keep getting locking errors when updating my index which puzzles me
since only one process is supposed to be accessing the index at a
time (at least in development mode).
I''m using Ferret with Rails (NOT acts_as_ferret, though) and employed
an observer to add a new document to the index when a new
ActiveRecord is created. I''m not sure if this has any impact on the
2006 Jul 05
2
Serialized object behaves weird
Hi!
I got a class named EinsatzFilter which I serialized to session. Before
saving to session it works afterwards I keep getting the message:
"undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from
ActiveRecord::Base inherited class.
Code:
class EinsatzFilter
include ApplicationHelper
attr_reader :personen, :monat, :projekte, :kunde
2006 Jun 08
1
Observable notifying a controller.
I want to code the following task:
I have a class, for instance, class A with is a observable.
I want to add a controller of my rails system to this class. So I can
notify_observer, and it updates all controllers of my system.
How do I pass a controller as a parameter to the add_observer() method?
And where I put this code?
Thanks in advance.
Fernando Lujan
2008 Apr 09
5
intermittent BJ errors
hi all
I''m running background tasks using BJ 1.0.1 (gem version). On some
requests, the tasks are executed as expected. On others, I get the
following error:
RuntimeError (no bj found in ["/u/apps/igniter/releases/20080408205801/
script", "/bin", "/usr/bin", "/sbin", "/usr/sbin"]):
when it runs, it runs fine but does anyone know what
2008 Apr 03
0
ActiveRecord::Observers?
wow, backgroundrb is great. in about 3 hours we had converted all our
daemons over from daemon-generator to backgroundrb, with much more
control and power. it''s awesome. the only problem is that we can''t
seem to get the observers to load.
in my worker, I go like this:
def create(args = nil)
ActiveRecord::Base.observers = :event_observer
2010 Aug 21
1
Rendering a different Javascript file in respond_to
Hi everyone, I am stuck in an (apparently) simple problem.
In my event_controller I have the i_like_it action:
def i_like_it
@event = Event.find(params[:id])
... # logic
respond_to do |format|
format.js
end
end
In my case "i_like_it" is called with :method => PUT (it is an Ajax
call, "i_like_it.js.erb" will be returned as a script and it wil be
2006 Mar 02
6
Newb question about facade columns
Hello,
I am trying to deal with a database table that contains a date in the
form of the number of seconds since epoch. Data is inserted in this
format by an existing script that I can''t change, so a schema change
isn''t realistic.
I would like to allow humans to view and edit this data in the form of
an actual human-readable date. I figured a facade column would be the
2006 Jun 10
6
table associations
First, thanks to everyone who replied to my pluralization question
from before!
Today I was trying to do what I think is called a "chained accessor".
I have an "events" table and each event has one user. Instead of
seeing the id number for each event''s user, I''d rather display the
names of users instead. I tried to do this:
class Event <
2006 Jun 15
8
rails saves it to the database and I don''t want to
Hello:
I am developing a web application to book machines for an event.
so I have an event model
class Event < ActiveRecord::Base
has_many :datetimes
...
end
and a datetime model
class Datetime < ActiveRecord::Base
belongs_to :event
...
end
I have developed a view with the event information and information for
the datetimes. and in the event_controller when I capture a datetime I