From 1b8548b88e958d4e5db48864619c3cceb4ecf0d7 Mon Sep 17 00:00:00 2001 From: Matt Moriarity Date: Mon, 30 Jul 2007 21:07:50 -0400 Subject: [PATCH] Set up the user activation. --- app/models/user_notifier.rb | 8 ++++---- app/views/user_notifier/activation.rhtml | 2 +- config/routes.rb | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/models/user_notifier.rb b/app/models/user_notifier.rb index cbc3758..8dff671 100644 --- a/app/models/user_notifier.rb +++ b/app/models/user_notifier.rb @@ -3,21 +3,21 @@ class UserNotifier < ActionMailer::Base setup_email(user) @subject += 'Please activate your new account' - @body[:url] = "http://YOURSITE/activate/#{user.activation_code}" + @body[:url] = "http://mylyrix.ath.cx/activate/#{user.activation_code}" end def activation(user) setup_email(user) @subject += 'Your account has been activated!' - @body[:url] = "http://YOURSITE/" + @body[:url] = "http://mylyrix.ath.cx/" end protected def setup_email(user) @recipients = "#{user.email}" - @from = "ADMINEMAIL" - @subject = "[YOURSITE] " + @from = "donotreply@mylyrix.ath.cx" + @subject = "[Lyrix] " @sent_on = Time.now @body[:user] = user end diff --git a/app/views/user_notifier/activation.rhtml b/app/views/user_notifier/activation.rhtml index 3e9c253..810e160 100644 --- a/app/views/user_notifier/activation.rhtml +++ b/app/views/user_notifier/activation.rhtml @@ -1,3 +1,3 @@ -<%= @user.login %>, your account has been activated. You may now start adding your plugins: +<%= @user.login %>, your account has been activated. You may now start adding songs: <%= @url %> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 539c109..6bdc65c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,6 +3,8 @@ ActionController::Routing::Routes.draw do |map| map.resources :songs, :usages, :users, :sessions map.resources :shows, :member => {:reorder => :put} + map.activate 'activate/:activation_code', :controller => 'users', :action => 'activate' + # Slingshot routes map.with_options(:controller => 'slingshot_sync') do |sync| sync.up 'sync/up', :action => 'up' -- 2.11.4.GIT