Sha256: 4174eac59138b6fac2b18a5ed7895a321af564ff046bf6832b69a818bda70dda

Contents?: true

Size: 362 Bytes

Versions: 25

Compression:

Stored size: 362 Bytes

Contents

module ApplicationHelper
  include Loco::Helpers

  def admin_panel?
    controller_path.split('/').first == 'admin'
  end

  def user_panel?
    controller_path.split('/').first == 'user'
  end

  def body_styles
    if admin_panel?
      'background-color: #99734B;'
    elsif user_panel?
      'background-color: #73994B;'
    else
      ''
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
loco-rails-3.0.5 test/dummy/app/helpers/application_helper.rb
loco-rails-3.0.4 test/dummy/app/helpers/application_helper.rb
loco-rails-3.0.3 test/dummy/app/helpers/application_helper.rb
loco-rails-2.5.3 test/dummy/app/helpers/application_helper.rb
loco-rails-2.5.2 test/dummy/app/helpers/application_helper.rb
loco-rails-3.0.2 test/dummy/app/helpers/application_helper.rb
loco-rails-3.0.1 test/dummy/app/helpers/application_helper.rb
loco-rails-2.5.1 test/dummy/app/helpers/application_helper.rb
loco-rails-2.5.0 test/dummy/app/helpers/application_helper.rb
loco-rails-2.4.0 test/dummy/app/helpers/application_helper.rb
loco-rails-2.3.0 test/dummy/app/helpers/application_helper.rb
loco-rails-3.0.0 test/dummy/app/helpers/application_helper.rb
loco-rails-2.2.2 test/dummy/app/helpers/application_helper.rb
loco-rails-2.2.1 test/dummy/app/helpers/application_helper.rb
loco-rails-2.2.0 test/dummy/app/helpers/application_helper.rb
loco-rails-2.1.0 test/dummy/app/helpers/application_helper.rb
loco-rails-2.0.0 test/dummy/app/helpers/application_helper.rb
loco-rails-1.5.2 test/dummy/app/helpers/application_helper.rb
loco-rails-1.5.1 test/dummy/app/helpers/application_helper.rb
loco-rails-1.5.0 test/dummy/app/helpers/application_helper.rb