Sha256: 711e8acc027e293f9525a7702dae291f8fec6783b82fb0ba75a7669dabba6ec2

Contents?: true

Size: 586 Bytes

Versions: 4

Compression:

Stored size: 586 Bytes

Contents

require 'fiona7/tasks/loader'

module Fiona7
  class TasksController < ActionController::Base
    def index
      @details_view = self.details_view_lambda
      @tasks = Fiona7::Tasks::Loader.new(self.user_name).call
    end

    protected
    def user_name
      if params[:mode] == 'user'
        rsession.user_name
      else
        nil
      end
    end


    def details_view_lambda
      lambda do |obj|
        begin
          lookup_context.find(obj.details_view_path).present?
        rescue ActionView::MissingTemplate
          false
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
infopark_fiona7-1.5.5.4.1 app/controllers/fiona7/tasks_controller.rb
infopark_fiona7-1.5.5.4.0 app/controllers/fiona7/tasks_controller.rb
infopark_fiona7-1.5.5.3.1 app/controllers/fiona7/tasks_controller.rb
infopark_fiona7-1.5.4.3.0 app/controllers/fiona7/tasks_controller.rb