Skip to content

Instantly share code, notes, and snippets.

@PabloVallejo
Last active August 29, 2015 14:10
Show Gist options
  • Save PabloVallejo/e1675cb4db8235f0c5e6 to your computer and use it in GitHub Desktop.
Save PabloVallejo/e1675cb4db8235f0c5e6 to your computer and use it in GitHub Desktop.
Helpful uncategorized tips.
# Autoload `lib` directory.
# Inside config/application.rb
config.autoload_paths << Rails.root.join('lib')
# Skip jbuilder files when generating scaffolds.
config.generators do |g|
g.assets false
g.helper false
g.test_framework nil
g.jbuilder false
end
# Or specifying one generator only.
config.generators.jbuilder = false
# Render to string.
@m = render_to_string :template => "template", :locals => {:sender => sender}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment