lolita 3.2.0.rc2 → 3.2.0.rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.rdoc CHANGED
@@ -5,6 +5,9 @@
5
5
  * Removed specific pagination methods from adapters
6
6
  * Removed Lolita::Configuration::Factory and Lolita::Configuration::Page
7
7
  * Range, Float, Symbol, Hash fields are added to support Mongoid ORM
8
+ * All fields automaticly have html_options[:class] updated with its type
9
+ * Assets can be passet to lolita through application configuration attribute #assets
10
+ * Polymorphic association field
8
11
 
9
12
  * Changes
10
13
  * #value, #value=, #record_value removed from Lolita::Configuration::Field
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  #Lolita
2
2
 
3
- Great Rails CMS, that turns your business logic into good-looking, fully functional workspace.
3
+ Great Rails CMS, that turns your business logic into good-looking, fully functional workspace.
4
+ Works with Rails 3.1
4
5
  ##Demo
5
6
  See the demo page at [Demo](http://lolita-demo.ithouse.lv)
6
7
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.0.rc2
1
+ 3.2.0.rc.3
@@ -34,4 +34,45 @@ $(function(){
34
34
  $(".tab .tab-title.grey").live('click',function(){
35
35
  $(this).parent().toggleClass("minimized")
36
36
  })
37
+ // Integer field validator
38
+ $(".integer").live("keydown",function(event){
39
+ // Allow only backspace and delete
40
+ if ( event.keyCode == 46 || event.keyCode == 8 ) {
41
+ // let it happen, don't do anything
42
+ }
43
+ else {
44
+ // Ensure that it is a number and stop the keypress
45
+ if (event.keyCode < 48 || event.keyCode > 57 ) {
46
+ event.preventDefault();
47
+ }
48
+ }
49
+ })
50
+
51
+ $("select[data-polymorphic-url]").live("change",function(){
52
+ var url = $(this).attr("data-polymorphic-url")
53
+ var select = $(this)[0]
54
+ var jselect = $(this)
55
+ var id = jselect.attr("id").replace(/_type$/,"_id")
56
+ jselect.find('option').each(function(i){
57
+ var option = $(this);
58
+ if(i==select.selectedIndex){
59
+ var val = option.val()
60
+ if(val.length > 1){
61
+ url = url.replace(/\/klass\//,"/"+val+"/")
62
+ var klass = option.val()
63
+ $.ajax({
64
+ url: url,
65
+ type: "get",
66
+ success:function(html){
67
+ $("#"+id).html(html)
68
+ }
69
+ })
70
+ }else{
71
+ $("#"+id).html("")
72
+ }
73
+
74
+ }
75
+ })
76
+ })
77
+
37
78
  })
@@ -0,0 +1,20 @@
1
+ class Lolita::FieldDataController < ApplicationController
2
+ include Lolita::Controllers::UserHelpers
3
+
4
+ before_filter :authenticate_lolita_user!
5
+ before_filter :find_field
6
+
7
+ def array_polymorphic
8
+ klass = params[:class].camelize.constantize
9
+ data_collection = @field.polymorphic_association_values(:klass => klass)
10
+ @id = params[:id].to_s.to_i
11
+ @collection = [[]]+data_collection
12
+ render_component(*@field.build(:state => :options_for_select, :collection => @collection, :id => @id))
13
+ end
14
+
15
+ def find_field
16
+ @field = params[:field_class].camelize.constantize.lolita.tabs.fields.detect{|field|
17
+ field.name.to_s == params[:name].to_s
18
+ }
19
+ end
20
+ end
@@ -9,4 +9,16 @@ module LolitaHelper
9
9
  end
10
10
  classes.join(" ")
11
11
  end
12
+
13
+ def include_application_assets
14
+ result = ""
15
+ Lolita.application.assets.each do |asset_name|
16
+ if attr_name.match(/\.js(\.|$)/)
17
+ result << javascript_include_tag(asset_name)
18
+ elsif attr_name.match(/\.css(\.|$)/)
19
+ result << stylesheet_link_tag(asset_name)
20
+ end
21
+ end
22
+ raw(result)
23
+ end
12
24
  end
@@ -1,7 +1,8 @@
1
- = hidden_field_tag "#{resource_name}[#{field.name.to_s.singularize}_ids][]",""
1
+ - ids_method = field.name.to_s.match(/_ids$/) ? field.name : "#{field.name.to_s.singularize}_ids"
2
+ = hidden_field_tag "#{resource_name}[#{ids_method}][]",""
2
3
  - field.view_values(self).each do |value|
3
- - editors = resource.send(:"#{field.name.to_s.singularize}_ids")
4
+ - editors = resource.send(:"#{ids_method}")
4
5
  .habtm-container
5
6
  = label_tag "#{resource_name}_#{field.name}_#{value.last}",value.first, :class => "habtm-label"
6
- = check_box_tag "#{resource_name}[#{field.name.to_s.singularize}_ids][]", value.last, resource.send("#{field.name.to_s.singularize}_ids").include?(value.last), :id => "#{resource_name}_#{field.name}_#{value.last}", :class => "habtm-checkbox"
7
+ = check_box_tag "#{resource_name}[#{ids_method}][]", value.last, resource.send("#{ids_method}").include?(value.last), :id => "#{resource_name}_#{field.name}_#{value.last}", :class => "habtm-checkbox"
7
8
  .clear
@@ -0,0 +1,6 @@
1
+ - record = tab_form.object
2
+ - type_name = field.association.name.to_s + "_type"
3
+ - id_name = field.association.name.to_s + "_id"
4
+
5
+ = tab_form.select(type_name,field.polymorphic_classes, {:include_blank => true},{:"data-polymorphic-url" => array_field_data_collector_path(:name => field.name, :field_class => record.class.to_s, :class => "klass", :id =>record.send(id_name) || 0) })
6
+ = tab_form.select(id_name, field.polymorphic_association_values(:record => record))
@@ -1,4 +1,4 @@
1
1
  <%= tab_form.select field.name,
2
2
  (field.view_values(self)),
3
- {:include_blank => field.include_blank},
3
+ (field.options || {}).merge({:include_blank => field.include_blank}),
4
4
  field.html_options || {} %>
@@ -16,6 +16,7 @@
16
16
  <%= yield :style %>
17
17
  <%= javascript_include_tag "lolita/application.js" %>
18
18
  <%= yield :script %>
19
+ <%= include_application_assets %>
19
20
  <%= raw csrf_meta_tag %>
20
21
  </head>
21
22
  <body>
data/config/routes.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
  match '/lolita' => "lolita/info#index"
3
3
  match '/lolita/info/properties' => "lolita/info#properties"
4
+ match "/lolita/array_field/:name/:field_class/:class/:id" => "lolita/field_data#array_polymorphic", :as => "array_field_data_collector"
4
5
  end
@@ -24,15 +24,26 @@ module Lolita
24
24
  end
25
25
 
26
26
  def key
27
- @association.association_foreign_key
27
+ if @association.macro == :belongs_to
28
+ @association.foreign_key
29
+ else
30
+ @association.association_foreign_key
31
+ end
28
32
  end
29
33
 
30
34
  def polymorphic?
31
35
  @association.options[:polymorphic]
32
36
  end
33
37
 
38
+ def native_macro
39
+ @association.macro
40
+ end
41
+
34
42
  def macro
35
- convertator = {:has_many => :many, :has_one => :one, :belongs_to => :one, :has_and_belongs_to_many => :many}
43
+ convertator = {
44
+ :has_many => :many, :has_one => :one, :belongs_to => :one,
45
+ :has_and_belongs_to_many => :many_to_many
46
+ }
36
47
  convertator[@association.macro]
37
48
  end
38
49
  end
@@ -77,11 +88,15 @@ module Lolita
77
88
  end
78
89
 
79
90
  def association
80
- unless @association
91
+ if @association.nil?
81
92
  possible_association = @adapter.associations.detect{|name,association|
82
93
  [association.key.to_s].include?(@name.to_s)
83
94
  }
84
- @association = possible_association.last if possible_association
95
+ @association = if possible_association
96
+ possible_association.last
97
+ else
98
+ false
99
+ end
85
100
  end
86
101
  @association
87
102
  end
@@ -24,13 +24,17 @@ module Lolita
24
24
  end
25
25
 
26
26
  def key
27
- @association.key
27
+ @association.foreign_key
28
+ end
29
+
30
+ def native_macro
31
+ @association.macro
28
32
  end
29
33
 
30
34
  def macro
31
35
  convertator = {
32
36
  :references_many => :many, :references_one => :one, :referenced_in => :one,
33
- :references_and_referenced_in_many => :many, :embeds_one => :one, :embeds_many => :many
37
+ :references_and_referenced_in_many => :many_to_many, :embeds_one => :one, :embeds_many => :many
34
38
  }
35
39
  convertator[@association.macro]
36
40
  end
@@ -76,11 +80,15 @@ module Lolita
76
80
  end
77
81
 
78
82
  def association
79
- unless @association
83
+ if @association.nil?
80
84
  possible_association = @adapter.associations.detect{|name,association|
81
85
  [association.key.to_s].include?(@name.to_s)
82
86
  }
83
- @association = possible_association.last if possible_association
87
+ @association = if possible_association
88
+ possible_association.last
89
+ else
90
+ false
91
+ end
84
92
  end
85
93
  @association
86
94
  end
@@ -16,9 +16,13 @@ module Lolita
16
16
  name = args[0] || options[:name] || (dbi_field ? dbi_field.name : nil)
17
17
  dbi_field ||= dbi.field_by_name(name)
18
18
  dbi_field ||= dbi.field_by_association(name)
19
- type = args[1] || options[:type] || (dbi_field ? dbi_field.type : nil) || :string
20
- options[:dbi_field] = dbi_field
19
+ association ||= detect_association(dbi,name)
21
20
 
21
+ type = args[1] || options[:type] ||
22
+ (association ? :array : nil ) ||
23
+ (dbi_field ? dbi_field.type : nil) ||
24
+ :string
25
+ options[:dbi_field] = dbi_field
22
26
  if !name || !type
23
27
  raise Lolita::FieldTypeError, "type not defined. Set is as second argument or as :dbi_field where value is Adapter::[ORM]::Field object."
24
28
  else
@@ -28,6 +32,10 @@ module Lolita
28
32
 
29
33
  end
30
34
 
35
+ def self.detect_association(dbi,name)
36
+ dbi.associations[name.to_sym]
37
+ end
38
+
31
39
  def self.field_class(name)
32
40
  ("Lolita::Configuration::Field::"+name.to_s.camelize).constantize
33
41
  end
@@ -101,7 +101,7 @@ module Lolita
101
101
 
102
102
  def find_dbi_field
103
103
  @dbi_field ||= self.dbi.fields.detect{|field|
104
- field.name.to_s == self.name.to_s || (field.association && field.association.name.to_s == self.name.to_s)
104
+ field.name.to_s == @name.to_s || (field.association && field.association.name.to_s == @name.to_s)
105
105
  }
106
106
  end
107
107
 
@@ -114,6 +114,11 @@ module Lolita
114
114
  def set_default_values
115
115
  self.options||={}
116
116
  self.html_options ||= {}
117
+ @html_options[:class] = if @html_options[:class]
118
+ "#{@html_options[:class]} #{self.type}"
119
+ else
120
+ self.type.to_s
121
+ end
117
122
  end
118
123
 
119
124
  def validate
@@ -1,16 +1,27 @@
1
1
  module Lolita
2
2
  module Configuration
3
3
  module Field
4
-
4
+ # Fields with Array is used to
5
+ # * create select for belongs_to association or
6
+ # * has_and_belongs_to_many field for selecting all associated objects or
7
+ # * for polymorphic belongs_to associations
8
+ # ==Polymorphic builder (:polymorphic)
9
+ # Create two select boxes one of all related classes and second with related records for that class.
10
+ # Related classes can have <em>polymorphic_select_name</em> instance method, that is used to populate second
11
+ # select with visible values by default it calles <em>text_method</em>. It will fallback first content column. Class should respond to one
12
+ # of these.
5
13
  class Array < Lolita::Configuration::Field::Base
6
14
  lolita_accessor :conditions,:text_method,:value_method,:find_options,:association,:include_blank
15
+ lolita_accessor :related_classes
7
16
 
8
17
  def initialize dbi,name,*args, &block
9
- self.builder="select"
10
18
  @include_blank=true
11
19
  super
12
20
  self.find_dbi_field unless self.dbi_field
13
- @association = self.dbi_field ? self.dbi_field.association : nil
21
+
22
+ @association ||= self.dbi_field ? self.dbi_field.association : detect_association
23
+ self.builder = detect_builder unless @builder
24
+ self.name = recognize_real_name
14
25
  end
15
26
 
16
27
  def options_for_select=(value=nil)
@@ -28,50 +39,118 @@ module Lolita
28
39
  # by default it it is <code>id</code>. Use <code>conditions</code> or
29
40
  # <code>find_options</code> for advanced search. When <code>find_options</code>
30
41
  # is used, than <code>conditions</code> is ignored.
31
- def association_values() #TODO test
42
+ def association_values(record = nil) #TODO test
32
43
  @association_values=if options_for_select
33
44
  options_for_select
45
+ elsif @association && @association.polymorphic?
46
+ polymorphic_association_values(record)
34
47
  elsif @association
35
48
  klass=@association.klass
36
- current_text_method=@text_method || default_text_method(klass)
37
- current_value_method=@value_method || :id
38
49
  options=@find_options || {}
39
50
  options[:conditions]||=@conditions
40
-
41
- klass.find(:all,options).map{|r|
42
- [r.send(current_text_method),r.send(current_value_method)]
43
- }
51
+ options_array(klass.find(:all,options))
44
52
  else
45
53
  []
46
54
  end
47
55
  @association_values
48
56
  end
49
57
 
58
+ # Collect values for polymorphic association, you may pass
59
+ # * <tt>:klass</tt> - class that's records are used
60
+ # * <tt>:record</tt> - record class that has polymorphic association. It is used to call to detect related object class.
61
+ def polymorphic_association_values(options={})
62
+ options ||= {}
63
+ options[:klass] ||= options[:record] && options[:record].send(self.name) ? options[:record].send(self.name).class : nil
64
+ if options[:klass]
65
+ options_array(options[:klass].all)
66
+ else
67
+ []
68
+ end
69
+ end
70
+
71
+ def options_array(collection)
72
+ klass = collection.last ? collection.last.class : nil
73
+ collection.map{|r|
74
+ [r.send(current_text_method(klass)),r.send(current_value_method)]
75
+ }
76
+ end
77
+
78
+ def current_text_method(klass)
79
+ @text_method || default_text_method(klass)
80
+ end
81
+
82
+ def current_value_method
83
+ @value_method || :id
84
+ end
85
+
50
86
  # used in views for shorter accessing to values
51
87
  def view_values(view)
52
- values = association_values
88
+ record = view.send(:tab_form).object
89
+ values = association_values(record)
53
90
  if values.respond_to?(:call)
54
91
  values.call(view)
55
92
  else
56
- association_values
93
+ association_values(record)
94
+ end
95
+ end
96
+
97
+ def detect_builder
98
+ if @association
99
+ if @association.polymorphic?
100
+ "polymorphic"
101
+ elsif @association.macro == :many_to_many
102
+ "habtm"
103
+ else
104
+ "select"
105
+ end
106
+ else
107
+ "select"
57
108
  end
58
109
  end
59
110
 
60
- private
111
+ def detect_association
112
+ unless @association
113
+ dbi.associations[self.name.to_sym]
114
+ else
115
+ @association
116
+ end
117
+ end
61
118
 
62
- def default_text_method(klass)
63
- assoc_dbi=Lolita::DBI::Base.create(klass)
64
- field=assoc_dbi.fields.detect{|f| f.type.to_s=="string"}
65
- if field
66
- field.name
67
- else
68
- raise Lolita::FieldTypeError, %^
69
- Can't find any content field in #{assoc_dbi.klass}.
70
- Use text_method in #{klass} to set one.
71
- ^
119
+ def polymorphic_classes
120
+ if @related_classes
121
+ @related_classes.map do |klass|
122
+ [klass.constantize.model_name.human, klass.to_s]
123
+ end
124
+ end
125
+ end
126
+
127
+ def recognize_real_name
128
+ if @association && !@association.polymorphic? && @association.macro == :one
129
+ self.name = @association.key
130
+ else
131
+ @name
132
+ end
133
+ end
134
+
135
+ private
136
+
137
+ def default_text_method(klass)
138
+ assoc_dbi=Lolita::DBI::Base.create(klass) rescue nil
139
+ if assoc_dbi
140
+ field=assoc_dbi.fields.detect{|f| f.type.to_s=="string"}
141
+ if field
142
+ field.name
143
+ else
144
+ raise Lolita::FieldTypeError, %^
145
+ Can't find any content field in #{assoc_dbi.klass}.
146
+ Use text_method in #{klass} to set one.
147
+ ^
148
+ end
149
+ else
150
+ warn("Not a ORM class (#{klass.inspect})")
151
+ end
72
152
  end
73
153
  end
74
154
  end
75
155
  end
76
156
  end
77
- end
@@ -3,7 +3,6 @@ module Lolita
3
3
  module Field
4
4
  class Integer< Lolita::Configuration::Field::Base
5
5
  def initialize dbi,name,*args, &block
6
-
7
6
  super
8
7
  end
9
8
  end
@@ -48,6 +48,12 @@ module Lolita
48
48
  self<<Lolita::Configuration::Factory::Tab.add(@dbi,*args,&block)
49
49
  end
50
50
 
51
+ def fields
52
+ @tabs.collect{|tab|
53
+ tab.fields
54
+ }.flatten
55
+ end
56
+
51
57
  def by_type(type)
52
58
  @tabs.detect{|tab| tab.type==type.to_sym}
53
59
  end
@@ -1,13 +1,19 @@
1
1
  module Lolita
2
2
  module SystemConfiguration
3
+ # This configuration is used in application lolita initializer
4
+ # For detailed documentation see initializer.
3
5
  class Application
4
6
 
5
- attr_writer :name
7
+ attr_writer :name, :assets
6
8
 
7
9
  def name
8
10
  @name || default_name
9
11
  end
10
12
 
13
+ def assets
14
+ @assets ||= []
15
+ end
16
+
11
17
  def default_name
12
18
  if defined?(Rails)
13
19
  Rails::Application.subclasses.first.to_s.split("::").first
data/lolita.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "lolita"
8
- s.version = "3.2.0.rc2"
8
+ s.version = "3.2.0.rc.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["ITHouse (Latvia) and Arturs Meisters"]
12
- s.date = "2011-09-06"
12
+ s.date = "2011-09-09"
13
13
  s.description = "Great Rails CMS, that turns your business logic into good-looking, fully functional workspace. "
14
14
  s.email = "support@ithouse.lv"
15
15
  s.extra_rdoc_files = [
@@ -36,6 +36,7 @@ Gem::Specification.new do |s|
36
36
  "app/assets/stylesheets/lolita/application.css",
37
37
  "app/assets/stylesheets/lolita/default.css.erb",
38
38
  "app/assets/stylesheets/lolita/style.css.erb",
39
+ "app/controllers/lolita/field_data_controller.rb",
39
40
  "app/controllers/lolita/info_controller.rb",
40
41
  "app/controllers/lolita/rest_controller.rb",
41
42
  "app/helpers/components/lolita/configuration/list_component.rb",
@@ -58,6 +59,8 @@ Gem::Specification.new do |s|
58
59
  "app/views/components/lolita/configuration/field/array/_display.html.erb",
59
60
  "app/views/components/lolita/configuration/field/array/filter/_display.html.erb",
60
61
  "app/views/components/lolita/configuration/field/array/habtm/_display.html.haml",
62
+ "app/views/components/lolita/configuration/field/array/polymorphic/_display.html.haml",
63
+ "app/views/components/lolita/configuration/field/array/polymorphic/_options_for_select.html.haml",
61
64
  "app/views/components/lolita/configuration/field/array/select/_display.html.erb",
62
65
  "app/views/components/lolita/configuration/field/big_decimal/_display.html.erb",
63
66
  "app/views/components/lolita/configuration/field/boolean/_display.html.erb",
@@ -81,7 +81,7 @@ describe Lolita::Configuration::Field do
81
81
 
82
82
  it "should allow set field that references to (has_many or has_one) any class" do
83
83
  field=Lolita::Configuration::Factory::Field.add(@dbi,:comments,:array)
84
- field.type.should == "array"
84
+ field.type.to_s.should == "array"
85
85
  field.association.macro.should == :many
86
86
  end
87
87
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolita
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0.rc2
4
+ version: 3.2.0.rc.3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-06 00:00:00.000000000Z
12
+ date: 2011-09-09 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &73543310 !ruby/object:Gem::Requirement
16
+ requirement: &85967590 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *73543310
24
+ version_requirements: *85967590
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: kaminari
27
- requirement: &73535470 !ruby/object:Gem::Requirement
27
+ requirement: &85963300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.12.4
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *73535470
35
+ version_requirements: *85963300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: abstract
38
- requirement: &73533920 !ruby/object:Gem::Requirement
38
+ requirement: &85962920 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *73533920
46
+ version_requirements: *85962920
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: builder
49
- requirement: &73533120 !ruby/object:Gem::Requirement
49
+ requirement: &85962540 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '3.0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *73533120
57
+ version_requirements: *85962540
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: haml
60
- requirement: &73531590 !ruby/object:Gem::Requirement
60
+ requirement: &85962140 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 3.1.2
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *73531590
68
+ version_requirements: *85962140
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jquery-rails
71
- requirement: &73529420 !ruby/object:Gem::Requirement
71
+ requirement: &85961800 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *73529420
79
+ version_requirements: *85961800
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: tinymce-rails
82
- requirement: &73528050 !ruby/object:Gem::Requirement
82
+ requirement: &85961450 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *73528050
90
+ version_requirements: *85961450
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: jeweler
93
- requirement: &73519800 !ruby/object:Gem::Requirement
93
+ requirement: &85961080 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 1.5.2
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *73519800
101
+ version_requirements: *85961080
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rspec
104
- requirement: &73518770 !ruby/object:Gem::Requirement
104
+ requirement: &85960610 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 2.6.0
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *73518770
112
+ version_requirements: *85960610
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rspec-rails
115
- requirement: &73517900 !ruby/object:Gem::Requirement
115
+ requirement: &85959250 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 2.6.1
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *73517900
123
+ version_requirements: *85959250
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: factory_girl
126
- requirement: &73516930 !ruby/object:Gem::Requirement
126
+ requirement: &85958850 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *73516930
134
+ version_requirements: *85958850
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: ffaker
137
- requirement: &73514800 !ruby/object:Gem::Requirement
137
+ requirement: &85957860 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *73514800
145
+ version_requirements: *85957860
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: ruby-debug19
148
- requirement: &73514200 !ruby/object:Gem::Requirement
148
+ requirement: &85956980 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *73514200
156
+ version_requirements: *85956980
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: database_cleaner
159
- requirement: &73513560 !ruby/object:Gem::Requirement
159
+ requirement: &85956420 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,7 +164,7 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *73513560
167
+ version_requirements: *85956420
168
168
  description: ! 'Great Rails CMS, that turns your business logic into good-looking,
169
169
  fully functional workspace. '
170
170
  email: support@ithouse.lv
@@ -193,6 +193,7 @@ files:
193
193
  - app/assets/stylesheets/lolita/application.css
194
194
  - app/assets/stylesheets/lolita/default.css.erb
195
195
  - app/assets/stylesheets/lolita/style.css.erb
196
+ - app/controllers/lolita/field_data_controller.rb
196
197
  - app/controllers/lolita/info_controller.rb
197
198
  - app/controllers/lolita/rest_controller.rb
198
199
  - app/helpers/components/lolita/configuration/list_component.rb
@@ -215,6 +216,8 @@ files:
215
216
  - app/views/components/lolita/configuration/field/array/_display.html.erb
216
217
  - app/views/components/lolita/configuration/field/array/filter/_display.html.erb
217
218
  - app/views/components/lolita/configuration/field/array/habtm/_display.html.haml
219
+ - app/views/components/lolita/configuration/field/array/polymorphic/_display.html.haml
220
+ - app/views/components/lolita/configuration/field/array/polymorphic/_options_for_select.html.haml
218
221
  - app/views/components/lolita/configuration/field/array/select/_display.html.erb
219
222
  - app/views/components/lolita/configuration/field/big_decimal/_display.html.erb
220
223
  - app/views/components/lolita/configuration/field/boolean/_display.html.erb
@@ -479,7 +482,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
479
482
  version: '0'
480
483
  segments:
481
484
  - 0
482
- hash: -500179811
485
+ hash: 675447699
483
486
  required_rubygems_version: !ruby/object:Gem::Requirement
484
487
  none: false
485
488
  requirements: