Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

dylan kane
dylan kane
2,772 Points

ruby on rails with html templates

i am making a ruby on rails web application, and before i even started the rails project, i designed the whole thing with html css and java. now, all i need to do is add sign in sign up and post blog stuff. to do that i need to put the website that is already made into a rails project, what changes would need to be made to the html to make it work exactly like it did when it wasnt in the rails application?

1 Answer

Kevin Korte
Kevin Korte
28,149 Points

RoR uses Views that are ERB files. So for instance, your index.html becomes index.html.erb and your contact.html becomes contact.html.erb. These go into your views folders, are tied to a specific controller and action via the routes.rb file, and have an underlying model if needed.

Those would be the changes needed.

dylan kane
dylan kane
2,772 Points

i understand this and i have been trying to do this, yet the files tend to not always look like they did before in the rails application. maybe the css files are not being read correctly, thats what it seems like