Displaying 3 results from an estimated 3 matches for "notice_id".
Did you mean:
note_id
2009 Aug 20
7
bulk email solutions
i need to send massive emails to various customers,
here 2 solutions i have think:
1-
customers = Customer.find(:all, :conditions => "newsletter = 1")
customers.each do |c|
@email = c.email
Mailer.deliver_send_newsletter(@subject, @email, @notice_id)
end
2-
customers = Customer.find(:all, :conditions => "newsletter = 1")
customers.each do |c|
addresses << c.email+", "
end
@emails=addresses.join.gsub(/(, )$/, '''')
Mailer.deliver_send_newsletter(@subject, @emails, @notice_id)
what is the right...
2009 Sep 09
1
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch Going Nuts!
...lass Notice < ActiveRecord::Base
has_many :graphics
end
--Project Controller
def create_notice
@notice = Notice.create(params[:notice])
end
--Form
<%= form.file_field(:graphic) %>
--Graphic
class Graphic < ActiveRecord::Base
belongs_to :notice
attr_accessor :notice_id
has_attached_file :graphic,
:storage => :s3,
:s3_credentials => RAILS_ROOT + "/config/s3.yml",
:path => ":attachment/:id/:style.:extension",
:bucket => "attachements"...
2009 Sep 10
2
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch
...Model
class Notice < ActiveRecord::Base
has_many :graphics
end
--Project Controller
def create_notice
@notice = Notice.create(params[:notice])
end
--Form
<%= form.file_field(:graphic) %>
--Graphic
class Graphic < ActiveRecord::Base
belongs_to :notice
attr_accessor :notice_id
has_attached_file :graphic,
:storage => :s3,
:s3_credentials => RAILS_ROOT + "/config/
s3.yml",
:path => ":attachment/:id/:style.:extension",
:bucket => "attachements"
e...