Permalink
Browse files

Mail_list: textarea output section included.

git-svn-id: http://svn.ducksoupsoftware.com/GradApp@95 3f375f3a-e948-0410-a91a-c7f4502e6309
  • Loading branch information...
1 parent 57f610a commit fb76cd4e3de292483088d5eaaced467ec117dfd8 floresj2 committed May 4, 2008
View
@@ -5,7 +5,13 @@
<projects>
</projects>
<buildSpec>
+ <buildCommand>
+ <name>org.rubypeople.rdt.core.rubybuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.rubypeople.rdt.core.rubynature</nature>
</natures>
</projectDescription>
@@ -1,17 +1,21 @@
class MailListController < ApplicationController
before_filter :gc_required
-
+
def index
-
-
-
+
+
+
end
-
+
def generate_list
-
- @graduate_applicants = GraduateApplicant.find(:all)
- #params[:applicant_status_id]
-
+
+ @graduate_applicants = GraduateApplicant.find(:all, :conditions => {:applicant_status_id => params[:graduate_applicant][:applicant_status_id]})
+
+ for graduate_applicant in @graduate_applicants
+ @text_status = ApplicantStatus.find(graduate_applicant.applicant_status_id).status
+ end
+
+
end
end
@@ -1,8 +1,9 @@
<h1>
Generated Mail List
</h1>
-
-<% for graduate_applicant in @graduate_applicants -%>
- <%= graduate_applicant.email %> ;
-<% end -%>
-
+<p>
+Listing all <%= @text_status %> applicant email addresses
+</p>
+<textarea rows='15' cols='40' readonly='readonly'><% for graduate_applicant in @graduate_applicants -%><%= graduate_applicant.email -%>;
+<% end %>
+</textarea>
@@ -1,4 +1,5 @@
<% form_tag :controller => 'mail_list', :action => 'generate_list' do %>
<%= select("graduate_applicant","applicant_status_id", ApplicantStatus.find(:all).collect {|d| [d.status, d.id] }) %>
<%= submit_tag "Generate" %>
+
<%end%>

0 comments on commit fb76cd4

Please sign in to comment.