Sha256: ab030fbaedd6301a40e45efe023388fd3acc59d45e7e377227eedda29a6311c8

Contents?: true

Size: 716 Bytes

Versions: 3

Compression:

Stored size: 716 Bytes

Contents

require 'dynamic_form'
require 'nested_form'
class Newsletter::ApplicationController < ApplicationController 
  layout 'newsletter/application'
  helper_method :title, :use_show_for_resources?, :site_url, :show_title?
  load_and_authorize_resource if respond_to? :load_and_authorize_resource

  before_filter :authenticate_user! if respond_to? :authenticate_user!

  def title(value=nil)
    @title = value if value.present?
    @title
  end

  def show_title?
    true
  end

  def use_show_for_resources?
    ::Newsletter.use_show_for_resources
  rescue 
    false
  end

  def site_url
    ::Newsletter.site_url
  rescue
    "#{default_url_options[:protocol]||'http'}://#{default_url_options[:domain]}"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newsletter-3.0.2 app/controllers/newsletter/application_controller.rb
newsletter-3.0.1 app/controllers/newsletter/application_controller.rb
newsletter-3.0.0 app/controllers/newsletter/application_controller.rb