Version | Release Date |
---|---|
5.0.0 | Sometime 2016? |
4.2.0 | Dec 20, 2014 |
4.1.0 | Apr 8, 2014 |
4.0.0 | Jun 25, 2013 |
3.2.0 | Jan 20, 2012 |
3.1.0 | Aug 31, 2011 |
3.0.0 | Aug 29, 2010 |
2.3.2 | Mar 15, 2009 |
$ bin/rake routes | grep devise
Prefix | Verb | URI Pattern | Controller#Action |
---|---|---|---|
new_user_session | GET | /users/sign_in(.:format) | devise/sessions#new |
user_session | POST | /users/sign_in(.:format) | devise/sessions#create |
destroy_user_session | DELETE | /users/sign_out(.:format) | devise/sessions#destroy |
user_password | POST | /users/password(.:format) | devise/passwords#create |
/* | |
* This is a manifest file that'll be compiled into application.css, which will include all the files | |
* listed below. | |
* | |
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | |
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. | |
* | |
* You're free to add application-wide styles to this file and they'll appear at the bottom of the | |
* compiled file so the styles you add here take precedence over styles defined in any styles | |
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new |
NOTE Markrundown now has a working draft implementation to be used with gitbook. See https://github.com/eliotsykes/gitbook-plugin-markrundown
Markrundown can be used to write a technical book that is a step-by-step guide to coding an application.
Markrundown allows you to write the book and the code for the book's example codebase in markdown.
Markrundown is intended for books that need to be regularly updated and rely on having an associated codebase that is stored in a git repo that the reader uses as a reference.
If the book is updated, markrundown will rebuild the book and the book's associated codebase git repo. Each new version of the book is tied to one new version of a git repo. This new git repo has no history from previous versions of the book. The git repo is built entirely from scratch at the same time the book is built from markdown into its output format.
# File: spec/support/login_helper.rb | |
module LoginHelper | |
def login(user) | |
visit new_user_session_path | |
fill_in 'Email', with: user.email | |
fill_in 'Password', with: user.password | |
click_button 'Log in' | |
expect(page).to have_content('Signed in successfully') |
// For use with the Ember Simple Auth Addon. This is one way to default to | |
// using authentication required routes. For a preferred solution see: | |
// https://github.com/simplabs/ember-simple-auth/wiki/Recipe:-Defaulting-to-Authentication-Required-Routes | |
import Ember from 'ember'; | |
import AuthConfig from 'simple-auth/configuration'; | |
export default Ember.Mixin.create({ | |
// The more secure default is to need authentication for all routes. Do not | |
// change this value in this file. Only change needsAuthentication in the |
// Examples | |
// Yes, "router.router" twice - this assumes that the router is being injected | |
// into the component. Otherwise lookup 'router:main' | |
// One of these will be of interest, figure out which one you want: | |
this.get('router.router.state'); | |
this.get('router.router.state.params'); | |
this.get('container').lookup('controller:application').currentPath; |
fruits = ['apples', 'bananas', 'coconuts', 'dates', 'elderberry'] | |
# Array[ ] accepts an integer to lookup by index, this is what we | |
# do most of the time when we work with arrays: | |
fruits[0] #=> 'apples' | |
fruits[2] #=> 'coconuts' | |
fruits[4] #=> 'elderberry' | |
# Array[ ] accepts negative integers too. These get special treatment. They | |
# count backwards from the end of the array: |
class Api::ApiController < ActionController::Base | |
protect_from_forgery with: :null_session | |
def self.disable_turbolinks_cookies | |
skip_before_action :set_request_method_cookie | |
end | |
disable_turbolinks_cookies | |
end |
In Terminal
mkdir ~/.bash
Copy the raw git-prompt.sh
file from git contrib in to the ~/.bash
directory: https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
Inside ~/.bashrc
or ~/.bash_profile
(choose the file where you normally put any bash customizations/setup), add the lines: