This file has been truncated, but you can view the full file.
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
` | |
~/ | |
~ | |
×™× | |
___ | |
__ | |
_ | |
--- |
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
;; Lets say you have a tight rope walker Pierre and he carries a pole | |
;; As birds land on the pole on one side or the other it gets | |
;; hard for the tight rope walker to keep his balance | |
;; If there is more than a 4 bird difference between the left | |
;; and right side of the pole he will fall off the tightrope | |
(def pole [0 0]) | |
(def threshold 4) |
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 MyDecorator | |
attr_accessor :age | |
validates_presence_of :age | |
def initialize(subject) | |
@subject = subject | |
end | |
def method_missing(name, *args) | |
@subject.send(name, *args) |
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
=form_for(@contacts, as: :contact, url: contact_delete_path, method: 'delete') do | |
- for contact in @contacts | |
%tr | |
%td= check_box_tag 'contact_ids[]', contact.id, false | |
%td= contact.email | |
%td= truncate contact.message, length: 150 | |
%td= link_to 'Show', contact | |
%td= link_to 'Edit', edit_contact_path(contact) | |
%td= link_to 'Destroy', contact, :confirm => 'Are you sure?', :method => :delete | |
%tr |