shortcut method for display table schema


/ Published in: Ruby

Add this inside your .irbrc file to call "show Model" in your console instead of "y Model.column_names"


Copy this code and paste it in your HTML
  1. #add this inside .irbrc
  2. #shortcut for y model.column_names
  3. def show(obj)
  4. y(obj.send("column_names"))
  5. end

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.