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
| $ ./script/server | |
| => Booting Mongrel | |
| => Rails 2.3.5 application starting on http://0.0.0.0:3000 | |
| /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:in `requirement': undefined local variable or method `version_requirements' for #<Rails::GemDependency:0xf6e64a78> (NameError) | |
| from /usr/local/lib/site_ruby/1.8/rubygems.rb:254:in `activate' | |
| from /usr/local/lib/site_ruby/1.8/rubygems.rb:1204:in `gem' | |
| from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:73:in `add_load_paths' | |
| from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths' | |
| from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `each' | |
| from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths' |
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 Date | |
| def to_words | |
| if self == Date.today | |
| "Today" | |
| elsif self <= Date.today - 1 | |
| if self == Date.today - 1 | |
| "Yesterday" | |
| elsif ((Date.today - 7)..(Date.today - 1)).include?(self) | |
| "Last #{self.strftime("%A")}" | |
| elsif ((Date.today - 14)..(Date.today - 8)).include?(self) |
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 Subject < ActiveRecord::Base | |
| validates_presence_of :name | |
| validates_uniqueness_of :name | |
| acts_as_tree | |
| class << self | |
| @@all_subjects =[] | |
| def get_all_childrens_recursive parent | |
| return if parent == nil |
NewerOlder