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
| autocmd BufWritePre * :%s/\s\+$//e |
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
| require 'user_app' | |
| map '/user' do | |
| run UserApp | |
| end |
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
| ## Error I get when using a validates_presence_of :description in my Special model | |
| durran-validatable-2.0.1/lib/validations/validation_base.rb:61:in `raise_error_if_key_is_dup': key Special/Validatable::ValidatesPresenceOf/description must be unique, provide the :key option to specify a unique key (ArgumentError) |
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
| # stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb | |
| # and made a lot more robust by me | |
| # this implementation uses erb by default. if you want to use any other template mechanism | |
| # then replace `erb` on line 13 and line 17 with `haml` or whatever | |
| module Sinatra::Partials | |
| def partial(template, *args) | |
| template_array = template.to_s.split('/') | |
| template = template_array[0..-2].join('/') + "/_#{template_array[-1]}" | |
| options = args.last.is_a?(Hash) ? args.pop : {} | |
| options.merge!(:layout => false) |
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
| # http://drnicutilities.rubyforge.org/map_by_method/ | |
| require 'map_by_method' | |
| # Dr Nic's gem inspired by | |
| # http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html | |
| require 'what_methods' | |
| # Pretty Print method | |
| require 'pp' |
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
| RAILS_ROOT/app/flex/src/ | |
| org/pillowfactory/models/Person.as => Add custom model behavior/properties here. | |
| org/pillowfactory/models/base/PersonBase.as* => Contains properties and model helper methods. | |
| org/pillowfactory/models/base/Base.as => Superclass to all generated models. | |
| org/pillowfactory/models/helpers/Errors.as => Implementation of the ActiveRecord Errors class. | |
| org/pillowfactory/models/helpers/Hash.as => Dynamic class with Ruby Hash-like methods. |
NewerOlder