a .each, but when I put to insert, it just insert the last index.
emails_controller.rb
emails = params[ :email ][ :email ].split( ";" )
@e = emails
action
<%= @e %>
return : ["myemail@first.com,My Name", "myemail@second.com,My Name"]
emails_controller.rb
emails.each do |e|
for_each_one = e.split( "," )
@a = for_each_one
#@email.name = for_each_one[ 0 ]
#@email.email = for_each_one[ 1 ]
#@email.save
#
#if @email.valid?
# @group.emails << @email
#end
end
action
<% @a.each do |a| %>
<%= a %><br />
<% end %>
return :
myemail@second.com
My Name
Thank you.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.