This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DynamicForm < ActiveRecord::Base | |
.... | |
has_many :field_definitions, :dependent => :destroy | |
def build_field_definitions(definitions) | |
JSON.parse(definitions).each do |definition| | |
puts definition.class | |
self.field_definitions << FieldDefinition.new(extract_field_definition(definition)) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This componet handles icon upload along with preview and drag drop. | |
* Usage: include it as xtype: 'imageuploadfield', including this field in a form requires us to submit it via a method submitWithImage instead of submit. | |
*/ | |
Ext.define('SomeNameSpace.ImageUploadField', { | |
alias: 'widget.imageuploadfield', | |
extend: 'Ext.form.FieldContainer', | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this somewhere in the initializer | |
#ActiveSupport.on_load(:active_record) do | |
# include Extensions::ActiveRecord::SerializeAttr | |
#end | |
# usage | |
# class User < ActiveRecord::Base | |
# serialize_attr :settings # serialize this field to use hstore, defaults to JSON if pg isn't there | |
#end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gives the ability to execute code before and after instance method, | |
# the methods on which to attach code can be passed declaritive using | |
# this marco | |
# class Foo | |
# acts_as_aspector_on :bar | |
# | |
# def bar | |
# puts "bar" | |
# end | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//As you can see in the video, the issue happens because this.answer returns from an if condition in here: | |
// callManager.js | |
this.answer = function(callid, onSuccess, onFailure, isVideoEnabled, videoQuality){ | |
var internalCall = calls[callid], | |
videoNegotationAvailable = this.isVideoNegotationAvailable(callid); | |
if(internalCall) { | |
// check if term side tries to answer an audio only call with video | |
if (videoNegotationAvailable === false && isVideoEnabled === true) { |