At the end of the day you should
- Feel comfortable in the terminal
- Know about ERB (Embeded Ruby) and how to use it
- Know how to start a new Rails project
- Have your project online
{ | |
"font_size": 15.0, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true, | |
"word_wrap": "true" |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold |
+ items.to_query | |
- | |
- def query(items) | |
- @query = '' | |
- items.each do |var| | |
- @query << "#{var.to_s}=" + eval("@#{var}") + "&" if eval("@#{var}") | |
- end | |
- URI.escape(@query) | |
- end | |
- |
encodeURIComponent(q).replace(/%20/g, '+').replace(/%2C/g, ',').replace(/%26/g, '&').replace(/%3D/g, '=').replace(/%2B/g, '+') |
def email_must_be_uniq | |
user = User.find_by_email(email) | |
if user.present? && user.id =! self.id | |
errors.add(:email, "is already taken") | |
end | |
end |
has_many :enrollments, class_name: "CourseEnrollment", conditions: "course_enrollments.role='student'", dependent: :destroy | |
has_many :student_enrollments, class_name: "CourseEnrollment", conditions: "course_enrollments.role='student'", dependent: :destroy |
[ | |
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} } | |
] |
def admin | |
if read_attribute(:admin) == "t" || read_attribute(:admin) == "1" | |
true | |
else | |
false | |
end | |
end | |
def admin=(value) |
# TODO Still don' know what this controller is for and what to do wiith it... |