[typo] [TYPO] config object is ... what?
Dan Bikle
dan.bikle at gmail.com
Sat Oct 29 20:30:26 EDT 2005
never mind,
I found it.
config is a method call:
class Configuration < ConfigManager
setting :blog_name, :string, 'My Shiny Weblog!'
setting :blog_subtitle, :string, ''
setting :default_allow_pings, :bool, false
setting :default_allow_comments, :bool, true
setting :sp_global, :bool, false
setting :sp_article_auto_close, :int, 0
setting :sp_allow_non_ajax_comments, :bool, true
setting :sp_url_limit, :int, 0
setting :text_filter, :string, ''
setting :comment_text_filter, :string, ''
setting :limit_article_display, :int, 10
setting :limit_rss_display, :int, 10
setting :geourl_location, :string, ''
setting :link_to_author, :bool, false
setting :show_extended_on_rss, :bool, true
setting :theme, :string, 'azure'
setting :use_gravatar, :bool, false
setting :ping_urls, :string,
"http://rpc.technorati.com/rpc/ping\nhttp://ping.blo.gs/\nhttp://rpc.weblogs.com/RPC2"
setting :send_outbound_pings, :bool, true
end
def config
$config ||= Configuration.new
end
On 10/29/05, Dan Bikle <dan.bikle at gmail.com> wrote:
> People,
>
> I'm new to Rails so I'm looking at other people's source code.
>
> I'm poking around in the Rails code for the blog engine named 'typo':
> http://typo.leetsoft.com/
>
> I'm looking at this file:
> http://typo.leetsoft.com/trac/file/trunk/app/controllers/application.rb
>
> I see:
>
> before_filter :reload_settings
>
> which is calling this:
>
> def reload_settings
> config.reload
> end
>
> I'm curious about the object named 'config'.
>
> I'm trying to figure out if it is a Rails object or Typo object.
>
> The fact that it has a reload() method suggests to me that is an object
> built from an ActiveRecord class.
>
> I tried poking around with grep and got too many lines back since config
> is such a common token.
>
> What is the config object?
>
> Anyone know?
>
> -Dan
>
More information about the Typo-list
mailing list