-
-
Save jschoolcraft/379c3b24a7521e148c29 to your computer and use it in GitHub Desktop.
This file contains 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::Initializer.run do |config| | |
config.gem "friendly_id", :version => ">= 2.3.0" | |
config.time_zone = 'Eastern Time (US & Canada)' | |
end |
This file contains 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
* [master][~/code/msm] rake friendly_id:redo_slugs MODEL=Organizer --trace | |
(in /Users/jschoolcraft/code/msm) | |
** Invoke friendly_id:redo_slugs (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
** Execute friendly_id:redo_slugs | |
rake aborted! | |
undefined method `use_slug?' for nil:NilClass | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/whiny_nil.rb:52:in `method_missing' | |
/opt/local/lib/ruby/gems/1.8/gems/friendly_id-2.3.0/lib/friendly_id/active_record2.rb:18:in `has_friendly_id' | |
/Users/jschoolcraft/code/msm/app/models/organizer.rb:2 | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:361:in `constantize' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `each' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `constantize' | |
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/inflections.rb:162:in `constantize' | |
/opt/local/lib/ruby/gems/1.8/gems/friendly_id-2.3.0/lib/friendly_id/active_record2/tasks.rb:24:in `klass=' | |
/opt/local/lib/ruby/gems/1.8/gems/friendly_id-2.3.0/lib/friendly_id/active_record2/tasks.rb:11:in `initialize' | |
/Users/jschoolcraft/code/msm/lib/tasks/friendly_id.rake:11:in `new' | |
/Users/jschoolcraft/code/msm/lib/tasks/friendly_id.rake:11 | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' | |
/opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 | |
/opt/local/bin/rake:19:in `load' | |
/opt/local/bin/rake:19 |
This file contains 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 Organizer < ActiveRecord::Base | |
has_friendly_id :name | |
validates_presence_of :name, :description, :home_page | |
validates_uniqueness_of :name, :on => :create, :message => "must be unique" | |
validates_format_of :home_page, :with => /^https?:\/\/.*$/, :on => :create, :message => "is invalid" | |
has_many :events | |
has_many :scraped_events | |
cattr_reader :per_page | |
@@per_page = 20 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment