AppDev Week 4
Crossroads!
2-3 small apps in Ruby
Flutter
React
Ionic.js
react separates frontend from back end, no server side rendering
4 more homework and then a small project that works
assignments
figure out which way Im leaning
ruby notes
attr_accessor creates a getter and setter function for whatever symbol you define
attr_reader creates the getter
initialize method to set up stuff for htat model before doing anything with it
first step is to inspect routes to limit user functionality
each of hte routes if you allow, determine who is allowed
and check the logic
next, don’t show people things they shouldn’t see
use conditional statements to hide things they shouldn’t see
in the view templates
define a before action to help minimize redundant code
gem that helps with authorization
Pundit gem!
remember rails doesnt autoload every folder! if a new one like policies is needed, you must note it
raise exception rather than redirect_back when theres an error
Top comments (0)