| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Light | |
| attr_reader :state | |
| def initialize() | |
| @state = :red | |
| end | |
| def tick(count=1) | |
| count.times do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ApplicationController < ActionController::Base | |
| around_filter :set_i18n_locale_from_current_user | |
| def set_i18n_locale_from_current_user | |
| org_timezone = I18n.current_timezone | |
| if current_user | |
| I18n.current_timezone = current_user.timezone | |
| end | |
| yield | |
| ensure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| system("bash", "-c", "cd #{Rails.root} && bundle exec rake tasks:regenerate['#{current_practice.id}'] &") |
OlderNewer