I am fairly new to Ruby and Rails. I am using rails 3. I am creating a project where people can login and post jobs and people can search jobs etc. I have created my users model and jobs model and everything is working just fine. I have started creating the home page layout and have added links to the other pages post work, find work, contact, about. I have a few questions hopefully someone can help please.
-
When I get into the rails server and check out the project and my home page it shows the login set up from the users model and it also shows the jobs model where someone can post a job. I am trying to figure out how I can make it so the jobs do not get posted on the home page but the find work page and people can search from that page? Do I need to link the jobs model to the find work page something like that?
-
How do I create the web pages for these other links i have established. I can not figure out how to build the page layout for the post work link i have or the other links I have for people to view the page layout. Any help is appreciated? Thanks again!
What you ask is mostly the basics of Rails. You can render jobs or any other model in any view you want, you just need to “send” these jobs to the views from you controller.
1.- Configure routes:
2.- Configure model controller:
3.- Configure view:
This is just a birds sight overview you should check some Rails tutorials.
About generating pages for content that isn’t in the db…
I had this issue once and solved it like this:
Now generate a view for each new page, lets say “About”, under
/app/views/homeand you can access each of them via/view_name.