Displaying 20 results from an estimated 700 matches similar to: "Attachment_fu and observers/emailing"
2010 Oct 03
1
Rails 3 observers
Rails Guides says:
...the UserObserver ... would be saved as app/models/user_observer.rb
and registered in config/environment.rb this way:
config.active_record.observers = :user_observer
But the observer registration above doesn''t work because there is no
''config''. For now, I''ve put it in the config/environments/[APP_ENV].rb
but that seems really sloppy and
2006 Jul 18
7
Observer not working
Help please.
I''m trying to observe a User class, but I can''t get this to work, the
after_create method never gets called... (the breakpoint never gets
called)
app/models/user_observer.rb:
class UserObserver < ActiveRecord::Observer
def after_create(user)
breakpoint
setting =
2007 Nov 12
1
help debugging ActionMailer with restful_authentication?
In a nutshell, I''m using restful_authentication that emails the user
when they sign up for an account
The development.log file shows the body of the e-mail message being
prepped to send out, but doesn''t show confirmation that it made it.
When I use gmail''s SMTP server, a Rails exception is thrown because
gmail expects an encrypted connection. A different type of Rails
2008 Sep 18
1
user_observer (restful_authentication) causes failure in loading rails
I have restful_authentication in use on an app and it has been working
fine, but I recently was changing the account creation flow and needed
to enable the UserObserver. I did so by including it in the
environment.rb (config.active_record.observers = :user_observer) and
Rails wouldn''t start.
I got the following error;
source/communitysites/vendor/rails/activerecord/lib/active_record/
2008 Apr 25
6
ActionMailer
Hi all,
I need a help. I have got a user registration form, where the user signs
up and then an activation link is sent to the user email id for
activating his/her account. Now I need to send an another email to the
user, only after he logs in for the first time in my site, then the
second email should be sent. Can anybody give me some suggestion on how
to do it ??
NB: When the user clicks on
2010 Dec 11
0
Rails 3 - Delayed_Job (collectiveidea), trying to Delay Mailers - Error: NoMethodError (undefined method `delay' for UserMailer:Class):
Hello, I have the following in an observer:
UserMailer.delay.msg_notification(record)
In user_mailer.rb
class UserMailer < ActionMailer::Base
...
def msg_notification(record)
mail(
:to => "#{record.user.email}",
:subject => "Notification"
)
end
..
end
But this errors with:
NoMethodError (undefined method `delay'' for
2010 Feb 08
0
recommending friends, using RoR's Mailer
Hi there, I wan tto be able to allow users to invite friends...
The action below is exactly the same as the code used to send a user
their username. Only difference is, I need to change the ''''user =
User.find_by_email(email)'''' part as obviously, I dont want to only
email people who are already on the site.
def invite
@title = "Invitation"
2008 Sep 15
1
[attachment_fu] Allways triggering after_attachment_saved callback
Hi,
I use attachment_fu in one of my apps and recently I''ve realized that
udpates are taking too much time. After some debugging I''ve found that
attachment_fu is calling after_attachment_saved callback no mather if
attachemnt has changed or not.
For example this code:
after_attachment_saved do |photo|
logger.info "after_attachment_saved"
end
# in console - always
2008 Nov 11
1
attachment_fu, aws-s3 and backgroundrb
Hi,
I''m using attachment_fu to store files on amazon s3. A background job is currently performing the upload and I''m having a strange issue where the very first file uploaded/created (attachment_fu uploads when creating the object) does not get uploaded. The db information is all all good. The model and attachment model associated with it are saved to the db, but the file is
2007 Mar 09
0
Merb + attachment_fu
Merbists,
I saw a note in the attachment_fu source code regarding supporting Merb[1]
as well as a post on the Caboose forum[2].
Has anyone gotten Merb working with Rick Olson''s attachment_fu to handle
uploads for a Rails app?
I''ve hacked together something, but it''s not pretty. Besides fixing the TODO
mentioned in the attachment_fu source code to support Merb
2007 Apr 18
3
nil.symbolize_keys -- error with attachment_fu
I''ve spent at least 2 hours on this one problem. On my local machine
in my controller I have this:
def new
@page_title = "New User"
@user = User.new
@photo = Photo.new
end
All is good.
Now, on the remote server I get an error when accessing the ''new''
view. If I remove @photo = Photo.new from the controller then the
error goes away. This same error
2009 Jul 24
1
Attachment_fu - watermark tmp file before saved to S3
Hi there,
I''d like to use RMagick to watermark an image in the tmp directory
before Attachment_fu saves it to Amazon S3.
I took a look at the callbacks available in attachment_fu. There''s an
''after_attachment_saved'' method but this would be too late, and a
''before_thumbnail_saved'' but this is no good because it''s for
thumbnails.
I
2009 Jul 17
1
attachment_fu :partition => lamda {}
Hi -
I am trying to dynamically create my partition folders via
attachment_fu. I have read about a hack that allows you to do this on
the attachment model:
:partition => lambda {|a| a.article_id}
Which passes the model''s object into the lambda and uses the
''article_id'' attribute as its directory name. However, this isn''t
work for me. I think the lambda
2008 Feb 02
1
attachment_fu stopped uploading files to S3
Hey everyone,
I''ve been using attachment_fu to upload large media files to S3 with
great success in my rails application. However, it has recently
stopped uploading.
My app appears to be uploading to somewhere, as my browser is
displaying a ''sending request to..." status message for about the
right length of time. The records are also created in my application
database.
2007 Mar 28
1
attachment_fu & update_attributes... bug?
It seems that attachment_fu is a pretty popular plugin (it''s great), but
I''ve been having a terrible time trying to figure out an issue when
using "update_attributes". I''m storing files on the file system rather
than in a database.
It seems that when "update_attributes" is called with a new file,
upload_data= tries to copy a file that
2007 Sep 25
2
attachment_fu default path
Hi all. I''ve done a little google search, but doesn''t find anything
(with "attachment_fu default path") that could help me in changing
attachment_fu''s default path.
My model:
[audio.rb]
has_attachment :max_size => 20.megabytes
has_attachment :content_type => "audio/mpeg"
has_attachment :storage => :file_system
2007 Dec 14
0
Calling GC.start with attachment_fu and RMagick -- where or if?
RMagick (and ImageMagick) have been criticized for memory leaks,
though the problem is avoidable by timely garbage collection -- see
this thread:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/edee971625603f82/e402fb95de40d54b
Attachment_fu does not call GC.start in any fashion that I can see, so
my questions are these: does it need to, and if so, where would be the
optimal
2007 Dec 17
1
attachment_fu error? Help!
FreeImage exception for type ???: IPTC: Invalid key ''Tag 0x0275
Anyone seen this?
FreeImage exception for type ???: IPTC: Invalid key ''Tag 0x0275''
[RAILS_ROOT]/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb:14:in
`with_image''
Thank you so much in advance for your help!
Mike
--
Posted via
2008 Jun 24
1
Importing bulk files using Attachment_fu
Hi -
Around the corner I have a project to migrate thousands of images per
user accounts. The existing structure is each user has a folder named
after their account - in it is all of their pics.
On the new setup I am using attachment_fu, which I noticed while using
physical storage on the server stores the images into folders/subfolders
based upon the object (if i''m not mistaken).
2007 Dec 06
0
saving the user id for thumbnails using attachment_fu
I am using attachment_fu to create thumbnails, and it is working
great. However, I am have a view with all my users thumbnails
displayed and am trying to make it so when you click on a thumbnail of
their avatar, it shows that users profile. In order to accomplish
this I have saved a user_id identifier for each avatar, but the
problem is that attachment_fu only saves this user_id for the main