0

I am creating an app and had my layouts up and running nicely. I ended up adding another migration scaffold for this geocode deal.

After getting errors, I found out that I need to add the rails g nifty:layout to fix the issue. This fixed my issue but my checklist main layout in the application.rb file was lifted to the location section of my app and was causing tables to overlap themselves.

I wanted to delete the generated scaffolds and ran rails g nifty:layout. I ran rails d nifty:layout to delete it to try and find another way and it deleted my whole views/applications.html.rb file.

Now my whole checklist app is messed up. How do I get that back or reverse what I did to get my layout back? I hope this makes sense. please help! I have it saved on bitbucket but not the most recent commit.

Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214
Awhitey98
  • 167
  • 1
  • 2
  • 14
  • 2
    The lesson here is to not space your commits too far apart. Make them small and focused. This sort of thing should be painless with version control. Depending on your platform, you *might* be able to salvage the files. Depending on your IDE, or settings, there may even be local backups automatically saved (there are in Rubymine). – Damien Roche Jul 16 '13 at 23:46
  • 1
    You should really try and use paragraphs. I have reformatted but please try a little harder. Sadly if you didn't commit recently, you'll be writing the code again – simonmorley Jul 17 '13 at 01:21
  • You deleted the file and didn’t have a backup, and that’s that for the most part. Not Rails’s fault and absolutely nothing to do with Rails. – Andrew Marshall Jul 17 '13 at 01:29
  • Thanks for the info! I will make sure to post my questions better next time. I figured it's my fault just didn't know if there was a solution. – Awhitey98 Jul 17 '13 at 02:49

0 Answers0