search for: contact_email

Displaying 8 results from an estimated 8 matches for "contact_email".

2008 Oct 25
7
Routing of result not clear in ActionMailer
Dear all, I am trying to understand the following behaviour of the ActionMailer in Rails 2. I have an emailer_controller.rb class EmailerController < ApplicationController def send_mail Emailer::deliver_contact_email(params[:email]) end end I have a model emailer.rb class Emailer < ActionMailer::Base def contact_email(email_params, sent_at = Time.now) @recipients = "webmaster-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org" @from = email_params[:name] + " <" + email_par...
2007 Mar 09
2
Blank fields getting validated
Hi, I am not sure if this is already answered in this list. I couldn''t find an answer. So I am posting the question. I have multiple validations for a field. For example: validates_presence_of :contact_email validates_format_of :contact_email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message => "is not a valid email address" When I submit the form with a blank contact_email I get 2 error messages: Contact email is not a valid e...
2006 Aug 11
5
Unit tests - NilClass problem
...tests. def test_create test_creation_of :model => Customer, :record => @customer, :fixture => @first, :attributes => [:id, :name, :contact_firstname, :contact_lastname, :contact_address, :contact_country, :contact_state, :contact_email, :contact_phone, :activationcode] end end and when trying to run it I get: ------------ Loaded suite customer_test Started F Finished in 0.731 seconds. 1) Failure: test_create(CustomerTest) [./../test_helper.rb:31:in `test_creation_of'' customer_test.rb:13:in `test_create...
2006 Jun 15
6
Newbie''s problem with a nil object he didn''t expect!
Dear Rubyists/Rails gurus, Though I''ve successfully completed the various Rails tutorials online and the Depot application from the Agile Web Development with Rails book, I''m still pretty much a Ruby/Rails newbie. I''m trying to learn by writing my own simple blogging application, but I''ve run into a problem that has had me scratching my head for a few days now.
2006 Jul 27
1
response from ajax request
...gt;</pre></td> <td> <% user.contacts.each do |contact| %> <%=contact.description %>:&nbsp; <% case contact.contact_type when CONTACT_PHONE %> <%= fmt_phone contact.phone %> <% when CONTACT_EMAIL %> <%= mail_to contact.email %> <% end %> <br /> <% end %> </td> <% if @user_is_admin %> <td class="clear"> <%= link_to image_tag("b_edit", { :style => ''border...
2006 Mar 21
3
Newbie - ActiveRecord relationships
...to_increment, `title` varchar(100) NOT NULL default '''', PRIMARY KEY (`id`) ) TYPE=InnoDB AUTO_INCREMENT=17 ; CREATE TABLE `clients` ( `id` int(4) NOT NULL auto_increment, `name` varchar(100) NOT NULL default '''', `contact` varchar(100) default NULL, `contact_email` varchar(100) default NULL, `contact_phone` varchar(30) default NULL, PRIMARY KEY (`id`) ) TYPE=InnoDB AUTO_INCREMENT=1 ; # Constraints for table `logs` ALTER TABLE `logs` ADD CONSTRAINT `0_243` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), ADD CONSTRAINT `0_244` FOREIGN KEY (`task_...
2012 Jan 15
2
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)
...er ####### this render seems to trigger it 13 14 # Run the generator again with the --webrat flag if you want to use webrat matchers 15 assert_select "form", :action => contacts_path, :method => "post" do 16 assert_select "input#contact_email", :name => "contact[email]" 17 assert_select "input#contact_person_id", :name => "contact[person_id]" 18 end 19 end 20 end These are the view files (with .haml extensions) app/views/contacts$ ls -l total 20 -rw-rw-r-...
2008 Jun 04
8
Accessing Params Hash form Action Mailer Model
I have used Action Mailer to collect data from a form and send it to a recipient. Rather than hard-code things like the subject, recipients, and return address into the model, I would like to include that information in hidden fields in my form thereby causing that information to be included in the params hash. My question is: How can I access that information from the params hash in the model?