2011年10月12日星期三

UGG Boot ActionRecord and ActionPack configuration

ActionRecord and ActionPack configuration 2010-04-13 14:36 ​​ActionRecord configuration sorted out easily check 1.ActionRecord: Base.logger = logger accepts a logger object. Change the object is used internally. Used to record database. If the application database operations to be recorded, will use the logger object. 2.ActionRecord: Base.primary_key_prefix_type = option if the option to nil. Then all the default table primary key fields are id, if you change the option value: table_name, will be in the value: table_name_with_underscore, table name and id will be in the following drawing lines between the separation. 3.ActionRecord: Base.table_name_prefix = For example, if the model class called User, the prefix string is database for concurrent development and testing,UGG Boot, this option will be able to camp in handy. 4 ActionRecord: Base.table_name_suffix = 6 ActionRecord: Base.colorize_logging = tru | false case of default, ActionRecord use ANSI control sequences to record log information, if the terminal application for browsing log supporters of these control sequences, some lines in the log information will be marked with different colors, if this option is set to false, logging information will not do the color processing 7 ActionRecord: Base.dafault_timezone =: local |: utc If set to: utc, will read from the database in UTC format date 8 ActionRecord: Locking.lock_optimistically = true | false If fale, it will disable created_at, created_on, updated_at and updated_on other fields are updated automatically. 9 ActionRecord: Errors.default_error_messages = hash the hash stored standard calibration failed. Can replace the information, which may be out of international consideration. ActionPack configuration 1 ActionController: Base.asset_host = url set to store static content (including style sheets, images, etc.) of the host and / or routing to connect to the static content files auxiliary labels. ActionController: Base.asset_host = If this option is set to false, the view templates will not be able to access the information. 3 ActionController: Base.consider_all_request_local = tru | false in a production environment is usually set this option to false, so that users can not see the error stack. 4 ActionController: Base.debug_routes = true | false If true, when the routing address resolution request form will not give detailed error information. 5 ActionController: Base.logger = logger to set the controller to use the logger, the application code can use this logger 6ActionController: Base.template_root = dir Rails will look down to the template file in this directory, the default value of app / view 7ActionController: Base. template_class = class default ActionView: Base, usually should not modify this setting. 8 ActionController: Base.ignore_missing_templates = true | false If true. Can not find the template file will not throw an error. 9 ActionController: Base.perform_caching = true | false If false, disable all caches. 10 ActionController: Base.page_cache_directory = dir to store cache files location, to be the web server document root directory 11 ActionController: Base.page_cache_extension = string cache file extension, default is html.12 ActionController: Base.fragment_cache_store = caching_class specified how to cache fragments. 13 ActionView: Base.cache_template_loading = false | true If true, the template file will be rendered cache, which can improve performance, but if you modify the template file you must restart the server to see the results. 14 ActionController: Base.field_error_proc = proc when the form field validation fails, it will be wrapped in its call set up here after a procedure. Ensure provincial as: Proc.new do | html_tag, instance |% {div class =

没有评论:

发表评论