DEV Community

dmacinto
dmacinto

Posted on

AppDev Week 2

Always use bootstrap for the basic CSS on a rails app

When using if statements, until you use a method on a variable, it may be blank and may always be true because it will output “ ”

rails db:rollback to rollback 1 migration

If you add a column, you add it to the form, forget that urls can’t be added without permitting the parameter

rails g migration AddDirectorIdToMovies

def the subhashes in the controller function to use it as a local variable

Partials help clean up the CSS on the application layout file significantly

When using render template: and doing a partial, make sure the partial file name has the _ with it.

Locals allows you to pass local variables

https://github.com/heartcombo/simple_form

Bootstrap cards comprise head, body, and footer

All active record objects have a partial path established

Read through the Ruby API documentation on partials

before_action is very useful for repeating actions in the controller, can put in the application controller to make it a little more seamless

%i is a quick way (ruby ) to create symbols

jbuilder is a template for creating json using ruby

Scaffold method to generate stuff very quickly

Use the devise gem for sign-in and sign-out, very boiler plate and easy to use !

Top comments (0)