Hi, I''m with a very basic doubt in MVC in RoR. I''m new at RoR, I had never developed an app in Rails since the beggining, just few things separately. I want to have a sign in page, like the first page the user see. After sign in I will have another page where I have a menu where user can do the basis operations (new, edit, show, ...). The stuture of the webpage is: sign_in page -> page with basic operations -> operations After creating the controller/views/model to do those operations, in which page should I put the sign in page? I mean the sign in page is not related to the controller, so on /app/views should I create another file (see below), for instance called index.html.erb? If controller is named A, I will have the following structure: /app/controller - A_controller.rb /app/views/A - edit.html.erb - new.html.erb - show.html.erb - (index.html.erb) --------> for sign in page? - (index_2.html.erb) --------> page with basic operations? After do the sign in it will be redirected to the page where I will have buttons (for instance) with new, edit, show operations, this page should be another page created by me (again) on the app/views/A ? How do you do it? I don''t know if you understand my problem. Please if not tell me, all help is welcome. Thanks Rita -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8be98eb6-526b-4efe-ab4c-281b31e045a3%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
You would need a separate controller to handle the sign-in part, with its own views. When it''s successful, it should redirect you to the A controller. This is how most apps do it. -- Dheeraj Kumar On Sunday 1 September 2013 at 3:48 AM, Rita Ferreira wrote:> Hi, > I''m with a very basic doubt in MVC in RoR. I''m new at RoR, I had never developed an app in Rails since the beggining, just few things separately. > > I want to have a sign in page, like the first page the user see. > After sign in I will have another page where I have a menu where user can do the basis operations (new, edit, show, ...). > > The stuture of the webpage is: > sign_in page -> page with basic operations -> operations > > > After creating the controller/views/model to do those operations, in which page should I put the sign in page? > I mean the sign in page is not related to the controller, so on /app/views should I create another file (see below), for instance called index.html.erb? > > If controller is named A, I will have the following structure: > > /app/controller > - A_controller.rb > /app/views/A > - edit.html.erb > - new.html.erb > - show.html.erb > - (index.html.erb) --------> for sign in page? > - (index_2.html.erb) --------> page with basic operations? > > > After do the sign in it will be redirected to the page where I will have buttons (for instance) with new, edit, show operations, this page should be another page created by me (again) on the app/views/A ? > > How do you do it? > I don''t know if you understand my problem. Please if not tell me, all help is welcome. > > Thanks > Rita > > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8be98eb6-526b-4efe-ab4c-281b31e045a3%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/28EEB66C857F4808BB4748F49AE7FAB4%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
just do google "rails tutorial", click on very first search result link ;-) On Aug 31, 2013 7:25 PM, "Dheeraj Kumar" <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You would need a separate controller to handle the sign-in part, with its > own views. When it''s successful, it should redirect you to the A > controller. This is how most apps do it. > > -- > Dheeraj Kumar > > On Sunday 1 September 2013 at 3:48 AM, Rita Ferreira wrote: > > Hi, > I''m with a very basic doubt in MVC in RoR. I''m new at RoR, I had never > developed an app in Rails since the beggining, just few things separately. > > I want to have a sign in page, like the first page the user see. > After sign in I will have another page where I have a menu where user can > do the basis operations (new, edit, show, ...). > > The stuture of the webpage is: > sign_in page -> page with basic operations -> operations > > After creating the controller/views/model to do those operations, in which > page should I put the sign in page? > I mean the sign in page is not related to the controller, so on /app/views > should I create another file (see below), for instance called > index.html.erb? > > If controller is named A, I will have the following structure: > > /app/controller > - A_controller.rb > /app/views/A > - edit.html.erb > - new.html.erb > - show.html.erb > - (index.html.erb) --------> for sign in page? > - (index_2.html.erb) --------> page with basic operations? > > > After do the sign in it will be redirected to the page where I will have > buttons (for instance) with new, edit, show operations, this page should be > another page created by me (again) on the app/views/A ? > > How do you do it? > I don''t know if you understand my problem. Please if not tell me, all help > is welcome. > > Thanks > Rita > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/8be98eb6-526b-4efe-ab4c-281b31e045a3%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/28EEB66C857F4808BB4748F49AE7FAB4%40gmail.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAAVKU-O%3D3Z_C8TnSsTasEVr1u2Kb4e6O1uCtDvf_dQnaUBwdRA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
On 1 September 2013 05:08, Pandya, Amit <a.p.pandya-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> just do google "rails tutorial", click on very first search result link ;-)Amit is right, work right through a good tutorial such as railstutorial.org (which is free to use online), including all the exercises, then you will be all set to go. Colin> > On Aug 31, 2013 7:25 PM, "Dheeraj Kumar" <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> You would need a separate controller to handle the sign-in part, with its >> own views. When it''s successful, it should redirect you to the A controller. >> This is how most apps do it. >> >> -- >> Dheeraj Kumar >> >> On Sunday 1 September 2013 at 3:48 AM, Rita Ferreira wrote: >> >> Hi, >> I''m with a very basic doubt in MVC in RoR. I''m new at RoR, I had never >> developed an app in Rails since the beggining, just few things separately. >> >> I want to have a sign in page, like the first page the user see. >> After sign in I will have another page where I have a menu where user can >> do the basis operations (new, edit, show, ...). >> >> The stuture of the webpage is: >> sign_in page -> page with basic operations -> operations >> >> After creating the controller/views/model to do those operations, in which >> page should I put the sign in page? >> I mean the sign in page is not related to the controller, so on /app/views >> should I create another file (see below), for instance called >> index.html.erb? >> >> If controller is named A, I will have the following structure: >> >> /app/controller >> - A_controller.rb >> /app/views/A >> - edit.html.erb >> - new.html.erb >> - show.html.erb >> - (index.html.erb) --------> for sign in page? >> - (index_2.html.erb) --------> page with basic operations? >> >> >> After do the sign in it will be redirected to the page where I will have >> buttons (for instance) with new, edit, show operations, this page should be >> another page created by me (again) on the app/views/A ? >> >> How do you do it? >> I don''t know if you understand my problem. Please if not tell me, all help >> is welcome. >> >> Thanks >> Rita >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rubyonrails-talk/8be98eb6-526b-4efe-ab4c-281b31e045a3%40googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rubyonrails-talk/28EEB66C857F4808BB4748F49AE7FAB4%40gmail.com. >> For more options, visit https://groups.google.com/groups/opt_out. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/CAAVKU-O%3D3Z_C8TnSsTasEVr1u2Kb4e6O1uCtDvf_dQnaUBwdRA%40mail.gmail.com. > > For more options, visit https://groups.google.com/groups/opt_out.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuBHKhPcYaJdTqWxvvv%3DGSMq5uHJ7iub-wawVS4piWtDQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
You''ll need to create a session''s controller to store in the session of the logged user, the MVC you created is good for registrations and all other CRUD related to it. On Sunday, September 1, 2013 3:48:38 AM UTC+5:30, Rita Ferreira wrote:> > Hi, > I''m with a very basic doubt in MVC in RoR. I''m new at RoR, I had never > developed an app in Rails since the beggining, just few things separately. > > I want to have a sign in page, like the first page the user see. > After sign in I will have another page where I have a menu where user can > do the basis operations (new, edit, show, ...). > > The stuture of the webpage is: > sign_in page -> page with basic operations -> operations > > After creating the controller/views/model to do those operations, in which > page should I put the sign in page? > I mean the sign in page is not related to the controller, so on /app/views > should I create another file (see below), for instance called > index.html.erb? > > If controller is named A, I will have the following structure: > > /app/controller > - A_controller.rb > /app/views/A > - edit.html.erb > - new.html.erb > - show.html.erb > - (index.html.erb) --------> for sign in page? > - (index_2.html.erb) --------> page with basic operations? > > > After do the sign in it will be redirected to the page where I will have > buttons (for instance) with new, edit, show operations, this page should be > another page created by me (again) on the app/views/A ? > > How do you do it? > I don''t know if you understand my problem. Please if not tell me, all help > is welcome. > > Thanks > Rita >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f6dc5461-e64e-418a-b704-230fc557a91c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
andreo-FdlSlcb4kYpknbxzx/v8hQ@public.gmane.org
2013-Sep-07 22:58 UTC
Re: Basic doubt in MVC - RoR
Rita, Please take attention to this and do what they are saying. read a turtorial, also I have noticed on another post you had classes with names in portuguese. this is a very bad practice since other people from other countries read ur code and want to help cant understand the semantics. After you work through a tutorial of rails, look at a gem called Devise, which allows you to have users with a great solution without any work(dont need to invent the wheel again...) Hope it helps and you find ROR fun. all the best, Andre -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c5816f03-ba1c-422b-8254-b5458e25a68e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.