Sha256: d69bc70ec7a7506b5c9b462e56d37620267645293003e9098bc43dc36fc84f39
Contents?: true
Size: 920 Bytes
Versions: 2
Compression:
Stored size: 920 Bytes
Contents
# Rails template to build the sample app for specs generate :model, "post title:string body:text published_at:datetime author_id:integer" inject_into_file 'app/models/post.rb', " belongs_to :author, :class_name => 'User'\n accepts_nested_attributes_for :author\n", :after => "class Post < ActiveRecord::Base\n" generate :model, "user first_name:string last_name:string username:string" inject_into_file 'app/models/user.rb', " has_many :posts, :foreign_key => 'author_id'\n", :after => "class User < ActiveRecord::Base\n" generate :model, 'category name:string' run "rm Gemfile" run "rm -r test" run "rm -r spec" rake "db:migrate" rake "db:test:prepare" # Install ActiveAdmin # This should happen last so that we don't have to worry about the # rake's blowing up due to not having active admin in their load paths $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) generate :'active_admin:install'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activeadmin-0.1.1 | spec/support/rails_template.rb |
activeadmin-0.1.0 | spec/support/rails_template.rb |