Ruby on Rails Monday, July 13, 2015

Of course.It will be 8th time to code he's twitter again

The problem for me is simple.
I have this emails:

john@gmail.com, alex@gmal89.com, stev89@yahoo.com, mike@yahoo.com and the all have some message (example): like a flower

The second email is invalid and i have made that working typing in create controller condition for saving data
Like this:

def create
if @invations.save && @invitations.check_for_valid_emails
#bla bla


this provided that i cant save wrong emails but when i correct email like this:

john@gmail.com, alex@gmal.com, stev89@yahoo.com, mike@yahoo.com

he doesn't save all emails but only first email (john@gmail.com) with message  like a flower  in database (i have check this by using index page i.e when i open index page
                                                                                                                                                         i can see only message for first email)

while i should seen for all my email saved massage.

  MY QUESTION IS:

How can i save for every (working) email (separated) in database with the  same message? Now i'm saving only for first email.

Conclude:
I have to save every valid email in database separated with message

This is layout (picture how it should look) is at the beginning of this replay

I need to finish this task by Thursday








On Monday, July 13, 2015 at 10:54:20 PM UTC+2, Colin Law wrote:
On 13 July 2015 at 21:28, StepaAr <ser.arseni...@gmail.com> wrote:
> I think it's time for rebooting.
>
> I will watch M.  Hartl tutorial again (8th time).

Don't just watch it, work right through it, entering all the code,
getting it working and doing the exercises.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b35ce56c-0a32-483d-b05d-db3ebb141ea1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment