Skip to content

Instantly share code, notes, and snippets.

@antillas21
Created January 8, 2011 00:44
Show Gist options
  • Save antillas21/770379 to your computer and use it in GitHub Desktop.
Save antillas21/770379 to your computer and use it in GitHub Desktop.
Files to edit after creating a Rails app with template: http://railswizard.org/d87652cae598fe1b11e1.rb
# in order to complete Devise initial requirements:
# app/views/layout/application.html.erb
<% flash.each do |key, value| %>
<div class='flash' id='<%= key %>'>
<%= value %>
</div>
<% end %>
# config/application.rb
require "mongoid/railtie"
# don't forget to include inside the application module configuration:
config.generators do |g|
g.orm :mongoid
end
# config/initializers/devise.rb
require 'devise/orm/mongoid'
# features/support/env.rb
require 'mongoid'
Before do Mongoid.master.collections.reject { |c| c.name == 'system.indexes'}.each(&:drop)
end
# comment this whole block
#if defined?(ActiveRecord::Base)
# begin
# require 'database_cleaner'
# DatabaseCleaner.strategy = :truncation
#rescue LoadError => ignore_if_database_cleaner_not_present
#end
#end
# in order to complete Devise initial requirements:
# it's better to do a per environment configuration
# config/environments/[development|test].rb
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
# in order to complete Devise initial requirements:
# config/routes.rb
root :to => "home#index"
# spec/spec_helper.rb
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures # config.fixture_path = "#{::Rails.root}/spec/fixtures"
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
# config.use_transactional_fixtures = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment