# coding: utf-8 module Formily # Formily gem settings class Config def initialize @editor = Formily::EditorConfig.new @paperclip = Formily::PaperclipConfig.new end # @return [Formily::EditorConfig] def editor @editor end # @return [Formily::PaperclipConfig] def paperclip @paperclip end # Set variable in do-end block # @example # tmp.setup do |config| # ... # end def setup yield self end end # Formily Form HTML editor config class EditorConfig # HTML form editor height (pixel) attr_accessor :height # HTML form editor width (pixel) attr_accessor :width def initialize @height = 500 @width = 720 end end # Paperclip gem config class PaperclipConfig # The full URL of where the attachment is publicly accessible. attr_accessor :url # The files that are assigned as attachments are, by default, placed in the directory specified by this option. attr_accessor :path # The URL that will be returned if there is no attachment assigned. # attr_accessor :default_url # attr_accessor :use_timestamp def initialize @path = ':rails_root/public/formily_file/:id/:style_:basename.:extension' @url = '/formily_file/:id/:style_:basename.:extension' # @default_url = '' @use_timestamp = false end end end