Sha256: b72fc4ffaccb1647871ea24c9dcf29ec9534fdf37fb60e048390f2a90280a525

Contents?: true

Size: 624 Bytes

Versions: 6

Compression:

Stored size: 624 Bytes

Contents

module Carrier
  module ApplicationHelper
    def error_messages_for(resource)
      if resource.errors.any?
        render :partial => "partials/error_messages_for", :locals => {:resource => resource}
      end
    end

    def archived? message
      return if !message || message.new_record?
      message.archived_for?(current_user) 
    end

    def b string
      content_tag :b, string
    end

    # Extract this query somewhere... 
    def without_current_user_select
      User.select('id, username').where(User.arel_table[:id].not_in(current_user.id)).collect {|user| [user.username, user.id] }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
carrier-0.1.5 app/helpers/carrier/application_helper.rb
carrier-0.1.4 app/helpers/carrier/application_helper.rb
carrier-0.1.3 app/helpers/carrier/application_helper.rb
carrier-0.1.2 app/helpers/carrier/application_helper.rb
carrier-0.1.1 app/helpers/carrier/application_helper.rb
carrier-0.1.0 app/helpers/carrier/application_helper.rb