Skip to content

Instantly share code, notes, and snippets.

View emtee's full-sized avatar
💭
Coding

Amit Jangu emtee

💭
Coding
View GitHub Profile
@emtee
emtee / maverick_test.yml
Created November 21, 2012 20:02
Demo yml file needed for Maverick
:models:
user:
:associations:
- has_and_belongs_to_many~studios
- belongs_to~role
:fields:
- name-string
- gender-string
role:
:associations:
@emtee
emtee / maverick
Created November 21, 2012 19:07
Template for creating a new rails app with pre-configured active admin + necessary migration and associations. It relies on a yml file to find out the model related information. Checkout the demo yml file here https://gist.github.com/4127296
# rails new maverick -m https://raw.github.com/gist/4126950/ -d mysql
# rake rails:template LOCATION=https://raw.github.com/gist/4126950/
# <------ Pre-requisits ------>
# Setting current directory (for loading the yml config file)
@current_dir = Dir.pwd.gsub("/#{app_name}", "")
def ask_wizard(question)
ask "\033[1m\033[30m\033[46m" + "prompt".rjust(10) + "\033[1m\033[36m" + " #{question}\033[0m"
end