Skip to content

Instantly share code, notes, and snippets.

@lcuevastodoit
Last active October 27, 2021 21:02
Show Gist options
  • Save lcuevastodoit/bfb5e0167efc6e12d54c143454586cee to your computer and use it in GitHub Desktop.
Save lcuevastodoit/bfb5e0167efc6e12d54c143454586cee to your computer and use it in GitHub Desktop.
RUBY ON RAILS COMANDOS
# Para ver los tipos de columnas de un modelo
Model.columns_hash.each {|k,v| puts "#{k} => #{v.type}"}
# debugging de una variable
<%if Rails.env.development?%>
<div class='row'></div>
<div class='col'></div>
<%= debug @contacts%>
<%end%>
# ver web-console
<%if Rails.env.development?%>
<%= console%>
<%end%>
# ver logs servidor
tail -300f log/development.log | egrep 'patron'
tail -300f log/development.log | egrep 'exp'
tail -300f log/development.log | egrep '\/\*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment