Linked List

A personal knowledge base


#Index Scopes and Associations With ctags

Exuberant ctags indexes source code so you can jump directly to definitions within editors such as vim that support tags files. Add the following to ~/.ctags to get it to index rails scopes and associations:

--regex-ruby=/^[ \t]*scope[ \t]*:([a-zA-Z0-9_]+)/\1/s,scopes/
--regex-ruby=/^[ \t]*(has_many|has_one|belongs_to)[ \t]*:([a-zA-Z0-9_]+)/\2/a,associations/

#Copy Sample File

See Shell Snippets page.

#Get Path to Current Page


#Get Full URL to Current Page

url_for(:only_path => false)

#Use Path Helpers in Class


which can be included in the class if desired.

#To use Fonts In vendor/assets/fonts

Rails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf)\z/

#Dynamic Footer Year

To automatically update your website copyright to the current year. See also

Copyright &copy;
<% copyright = %>
<%= [copyright.min, copyright.max].uniq.join(' &ndash; ').html_safe %>
Last modified: 27 Sep 2016