0
# Include your application configuration below
0
-require 'zip/zipfilesystem'
0
- def register_liquid_tags
0
- Liquid::Template.register_filter(Mephisto::Liquid::Filters)
0
- Liquid::Template.register_tag(:textile, Mephisto::Liquid::Textile)
0
- Liquid::Template.register_tag(:commentform, Mephisto::Liquid::CommentForm)
0
- Liquid::Template.register_tag(:pagenavigation, Mephisto::Liquid::PageNavigation)
0
- Liquid::Template.register_tag(:head, Mephisto::Liquid::Head)
0
- def reset_application_with_plugins!
0
- returning reset_application_without_plugins! do
0
- alias_method_chain :reset_application!, :plugins
0
-Dispatcher.register_liquid_tags
0
-RubyPants # load RubyPants
0
-ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.update \
0
- :standard => '%B %d, %Y @ %I:%M %p',
0
- :stub => '%B %d', # XXX what is the meaning of stub in this context? (Basically it means short)
0
- :time_only => '%I:%M %p',
0
- :plain => '%B %d %I:%M %p'
0
-# Time.now.to_ordinalized_s :long
0
-# => "February 28th, 2006 21:10"
0
-module ActiveSupport::CoreExtensions::Time::Conversions
0
- def to_ordinalized_s(format = :default)
0
- format = ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS[format]
0
- return to_default_s if format.nil?
0
- strftime(format.gsub(/%d/, '_%d_')).gsub(/_(\d+)_/) { |s| s.to_i.ordinalize }
0
-# http://rails.techno-weenie.net/tip/2005/12/23/make_fixtures
0
-ActiveRecord::Base.class_eval do
0
- # person.dom_id #-> "person-5"
0
- # new_person.dom_id #-> "person-new"
0
- # new_person.dom_id(:bare) #-> "new"
0
- # person.dom_id(:person_name) #-> "person-name-5"
0
- def dom_id(prefix=nil)
0
- display_id = new_record? ? "new" : id
0
- prefix ||= self.class.name.underscore
0
- prefix != :bare ? "#{prefix.to_s.dasherize}-#{display_id}" : display_id
0
- # Write a fixture file for testing
0
- def self.to_fixture(fixture_path = nil)
0
- File.open(File.expand_path(fixture_path || "test/fixtures/#{table_name}.yml", RAILS_ROOT), 'w') do |out|
0
- YAML.dump find(:all).inject({}) { |hsh, record| hsh.merge(record.id => record.attributes) }, out
0
- # Used for getting multifield attributes like those generated by a
0
- # select_datetime into a new Time object. For example if you have
0
- # following <tt>params={:meetup=>{:"time(1i)=>..."}}</tt> just do
0
- # <tt>Time.parse_from_attributes(params[:meetup], :time)</tt>
0
- def parse_from_attributes(attrs, field, method=:gm)
0
- attrs = attrs.keys.sort.grep(/^#{field.to_s}\(.+\)$/).map { |k| attrs[k] }
0
- attrs.any? ? Time.send(method, *attrs) : nil
0
+require 'mephisto_init'
0
\ No newline at end of file
Comments
No one has commented yet.