Displaying 4 results from an estimated 4 matches for "pv5ro7".
2012 Nov 08
1
validates_uniqueness_of(*attr_names) w scope not working in unit test
...domain_id
class UserTest < ActiveSupport::TestCase
def initialize_user
@booboo = FactoryGirl.create(:subdomain, name: "booboo")
@coocoo = FactoryGirl.create(:subdomain, name: "coocoo")
FactoryGirl.create(:user, subdomain_id: @booboo[:id], email:
"user.doe-PV5Ro7/Mrj4@public.gmane.org", password: "UkZaHWcy", password_confirmation:
"UkZaHWcy")
end
def teardown
User.delete_all
Subdomain.delete_all
end
test "should_save_user_with_duplicated_email_in_another_scoped_subdomain"
do
user = FactoryGirl.build(...
2011 May 12
1
RegExp does not match
Hi,
When I try this on IRB it works fine as follows:
>>/\A[\w+\-.!#$\%&''*\/\=?^`{|}~]+@[a-z\d\-.]+\.[a-z]+\z/.match("jd!#$\%&''*+-/=?^_`{|}~oe-PV5Ro7/Mrj4@public.gmane.org")
=> #<MatchData "jd!%&''*+-/=?^_`{|}~oe-PV5Ro7/Mrj4@public.gmane.org">
When I try it through my Ruby on Rails program I get a nil. Any idea
what is
happening? I am of course trying to validate an email syntax.
The regex is /\A[\w+\-.!#$\%&...
2007 Feb 01
6
Using a nonstandard foreign key
Hopefully this is an interesting question.
I have a "user" table with a field "email_address". I would like the
part of "email_address" after the ''@'' to be a foreign key to a
"companies" table populated by a companies that are clients.
Any pointers on how to do this in rails?
--~--~---------~--~----~------------~-------~--~----~
You
2011 Mar 04
1
How to modify the template path for ActionMailer used in a Ruby script ?
...older ''joinus_email
- joinus_email
joinus_email.rb
notifier.rb
- notifications
joinus_email.html.erb
joinus_email.text.erb
running the script joinus_email.rb, (in which I defined the
ActionMailer::Base.smtp_settings)
mail = Notifier.joinus_email("john.doe-PV5Ro7/Mrj4@public.gmane.org").deliver
is raising an exception :
exception: Missing template notifier/joinus_email with
{:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en]}
in view paths
notifier.rb
class Notifier < ActionMailer::Base
default :from =&g...