Sha256: c14821c5585e90468148f8561f9d21a330c9fd79060228b4f86741f2c641e033

Contents?: true

Size: 463 Bytes

Versions: 17

Compression:

Stored size: 463 Bytes

Contents

module Plugins
  module Core
    class UserCell < Plugins::Core::Cell
      def dropdown
        render
      end

      private

      def value
        data&.[]('user_id') || @options[:default_value]
      end

      def render_select
        @options[:form].select 'data[user_id]', user_data_for_select, {selected: value}
      end

      def user_data_for_select
        @options[:user_data].map{ |user| [user.fullname, user.id] }
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
cortex-plugins-core-0.8.0 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.7.2 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.7.1 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.7.0 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.6.0 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.5.0 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.4.8 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.4.7 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.4.6 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.4.5 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.4.4 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.4.3 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.4.2 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.4.1 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.4.0 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.3.1 app/cells/plugins/core/user_cell.rb
cortex-plugins-core-0.3.0 app/cells/plugins/core/user_cell.rb