bhf 0.4.32 → 0.4.33

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.
@@ -30,7 +30,12 @@ class Bhf::EntriesController < Bhf::ApplicationController
30
30
  redirect_back_or_default(bhf_page_url(@platform.page_name, anchor: "#{@platform.name}_platform"), notice: set_message('create.success', @model))
31
31
  else
32
32
  @form_url = bhf_entries_path(@platform.name)
33
- render :new
33
+
34
+ if @quick_edit
35
+ render json: object_to_bhf_display_hash, status: :ok
36
+ else
37
+ render :new
38
+ end
34
39
  end
35
40
  end
36
41
 
@@ -93,7 +98,7 @@ class Bhf::EntriesController < Bhf::ApplicationController
93
98
  private
94
99
 
95
100
  def object_to_bhf_display_hash
96
- @platform.columns.each_with_object({to_bhf_s: @object.to_bhf_s}) do |column, hash|
101
+ @platform.columns.each_with_object({to_bhf_s: @object.to_bhf_s, new_record: @object.new_record?}) do |column, hash|
97
102
  unless column.field.macro == :column && @object.send(column.name).blank?
98
103
  p = "bhf/pages/macro/#{column.field.macro}/#{column.field.display_type}.html"
99
104
  hash[column.name] = render_to_string partial: p, locals: {column: column, object: @object}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bhf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.32
4
+ version: 0.4.33
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: