Sha256: c28ea9eca2d70fa50f67715793e8e863f6785d86975d0db94bfcb0811b415d68

Contents?: true

Size: 1.66 KB

Versions: 1

Compression:

Stored size: 1.66 KB

Contents

# EffectivePosts Rails Engine

EffectivePosts.setup do |config|
  config.posts_table_name = :posts

  # Every post must belong to one or more category.
  # Don't use the category :posts
  config.categories = [:blog, :news]

  # Create top level routes for each category
  # Should each of the above categories have a top level route created for it
  # For example:
  #   Visiting /blog will display all posts created with the :blog category
  #   Visiting /news will display all posts created with the :news category
  #
  # Regardless of this setting, posts will always be available via /posts?category=blog
  config.use_category_routes = true

  # Number of posts displayed per page (Kaminari)
  config.per_page = 10

  # Post Meta behaviour
  # Should the author be displayed in the post meta?
  # The author is the user that created the Effective::Post object
  config.post_meta_author = true

  # Use CanCan: authorize!(action, resource)
  # Use effective_roles:  resource.roles_match_with?(current_user)
  config.authorization_method = Proc.new { |controller, action, resource| true }

  # Layout Settings
  # Configure the Layout per controller, or all at once
  config.layout = {
    :pages => 'application',
    :admin => 'application'
  }

  # SimpleForm Options
  # This Hash of options will be passed into any simple_form_for() calls
  config.simple_form_options = {}

  # config.simple_form_options = {
  #   :html => {:class => 'form-horizontal'},
  #   :wrapper => :horizontal_form,
  #   :wrapper_mappings => {
  #     :boolean => :horizontal_boolean,
  #     :check_boxes => :horizontal_radio_and_checkboxes,
  #     :radio_buttons => :horizontal_radio_and_checkboxes
  #   }
  # }

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
effective_posts-0.2.0 lib/generators/templates/effective_posts.rb