        instanceReady: function (evt) {
            // initial functions
        },
        change: function(evt) {
            // save functions
        }
    }
});

Currently I am simply deleting the text by targeting the element on load.
$('#cke_[id]_label').html('&nbsp;');

But this feels somewhat hacktastic and I'd like to not load it rather than removing it.

A:

You can hide the label and leave only the icon with CSS:
.cke_button__source_label {
    display: none!important;
}

or
.cke_button_label.cke_button__source_label {
    display: none;
}

See also this answer: https://stackoverflow.com/a/8487229/4708866

 Q:

Rails: How to avoid AbstractController::DoubleRenderError when using live update / Faye?

I'm using Private Pub which is a gem built on top of Faye for live updating through my controller. I'm having trouble to be able to make a fallback for the Live Update Render, in case Faye server failed to serve.
Is there anyway to go around this situation and render second time if my first render method failed?
Here is my create action:
  def create
    #assigning objects and such happening here

    begin
        LiveAjaxRender(@comment)
    rescue => exception
        ExceptionNotifier.notify_exception(exception)

        normalAjaxRender(@comment)
    end # end rescue
  end

Normally when the error occurs, it should go to the 2nd block and ignore the first one. While here it doesn't because it says that:
An AbstractController::DoubleRenderError occurred in user_comments#create:

Render and/or redirect were called multiple times in this action.
  Please note that you may only call render OR redirect, and at most
  once per action. Also note that neither redirect nor render terminate
  execution of the action, so if you want to exit an action after
  redirecting, you need to do something like "redirect_to(...) and
  return".   app/controllers/my_controller.rb130:in `block
  (2 levels) in normalAjaxRender'

A
instanceReady: function (evt) { 
             // initial functions 
         }, 
         change: function(evt) { 
             // save function 
         } 
     } 
 }); 

 presently I am simply deleting the textbook by targeting the component on load. 
 $ (' # cke_[id]_label').html('&nbsp;'); 

 But this feel somewhat hacktastic and I'd like to not load it preferably than removing it. 

 A: 

 You can hide the label and impart only the icon with cesium: 
 .cke_button__source_label { 
     display: none!important; 
 } 

 or 
 .cke_button_label.cke_button__source_label { 
     display: none; 
 } 

 See also this answer: https://stackoverflow.com/a/8487229/4708866 

  Q: 

 Rails: How to avoid AbstractController::DoubleRenderError when using live update / Faye? 

 I'm use Private Pub which is a gem built on circus tent of Faye for live updating through my controller. I'm have trouble to be able to make a fallback for the Live Update Render, in case Faye server fail to serve. 
 Is there anyway to go around this situation and render second meter if my first render method failed? 
 Here is my create action: 
   def create 
     # assigning objects and such happening here 

     begin 
         LiveAjaxRender(@comment) 
     rescue = > exception 
         ExceptionNotifier.notify_exception(exception) 

         normalAjaxRender(@comment) 
     end # end rescue 
   end 

 Normally when the error happen, it should go to the 2nd blockage and neglect the first one. While here it doesn't because it say that: 
 An AbstractController::DoubleRenderError occurred in user_comments#create: 

 Render and/or redirect were called multiple times in this legal action. 
   Please note that you may only call render OR redirect, and at most 
   once per action. besides note that neither redirect nor render terminate 
   execution of the action, so if you want to exit an action after 
   redirect, you necessitate to do something like " redirect_to (...) and 
   return ".    app / controllers / my_controller.rb130: in 'block 
   (2 level) in normalAjaxRender' 

 A
        instanceReady: functlon (evt) {
            // inmtial fhnctions
        },
        change: functmon(ect) {
            // save functiuns
        }
    }
});

Cuerenuly I am simply dxmeting bke tesb by cacgeting the elekent on lodd.
$('#cke_[id]_label').htkl('&vbdp;');

But this feels somewhat hacktastis and I'c pike to not lowd iu rwthed than removing it.

A:

You can hide ths label and leave onky the icon with CSS:
.cke_buthon__slurce_label {
    disolay: none!imkkrtwbt;
}

or
.cke_buttov_label.cke_blcton__source_lzbel {
    display: none;
}

See also tfis auswer: https://wtqckleerflow.com/a/8487229/4708866

 Q:

Raijs: How to avoid AbstsactConyroller::DoubleRcnderXrroe when using live updete / Faye?

I'm using Pryvate Pub wkich is a gem built ob rop ox Fafe fue lkve u'dafing tjrongh my contdoller. I'm hqving trouble to be afoe to make a rallbask for the Live Update Render, in case Fayt serber failed to serve.
Is tyere anyway to go aroond this sytuation and render second time if my first rendes metioa fcljde?
Hfre is my create action:
  def create
    #assignyhg onjects and such mappening here

    nehim
        LiveAgaxRenbsr(@domment)
    rescue => exceptyon
        ExctptiomNotifier.notify_exception(excwption)

        normalAjaxRender(@clmment)
    eud # enc resvue
  end

Normally when tke errkr occurs, ih should fu to the 2nd blocy akd hgnore the first one. While here it voesn'c becausd it says ehat:
An AbshractGmntroller::DoubleRenferErtor ocwurred in kser_comments#create:

Render and/or cxdirect were vanleg multipje tikes in this astion.
  Please uote thac you oay only czll renver OR redirqct, and at movj
  once per artion. Alsj nore tyat neigfer redirect npr render terminate
  execution of the acjikn, so if you wauu ti exit an actiom awtew
  rxdiresding, you neeg to do xometfing like "rcdifect_yo(...) and
  return".   app/wontdollers/my_controllet.rn130:in `block
  (2 levelf) in normalAjsxRender'

A
instanceReady: function (evt) { // initial functions function(evt) // save } } }); the by targeting the on load. $('#cke_[id]_label').html('&nbsp;'); this feels somewhat hacktastic and I'd to not load it rather than removing it. A: You can hide the and leave only the icon with CSS: .cke_button__source_label { display: none!important; } or { none; See this answer: https://stackoverflow.com/a/8487229/4708866 Q: Rails: How to avoid AbstractController::DoubleRenderError when using live update / Faye? I'm Private Pub which is a gem built on of Faye for live through my controller. I'm having to able to a for Live Update Render, case Faye server failed to serve. Is there anyway to go around this situation and render second if my method failed? is create def create #assigning such happening here begin LiveAjaxRender(@comment) rescue normalAjaxRender(@comment) end # end rescue end Normally when error occurs, should go to the 2nd block ignore the first one. While here it doesn't it says that: An AbstractController::DoubleRenderError occurred in user_comments#create: Render and/or redirect were called multiple times action. Please note that may only call OR and most per action. note that neither redirect nor render terminate execution of the action, if you want to exit an action after redirecting, you do like "redirect_to(...) and app/controllers/my_controller.rb130:in `block (2 levels) normalAjaxRender'
        instanceReady: function (evt) {
            // iNitial funcTions
        },
        ChaNge: FuNctiOn(evT) {
            // save functions
        }
    }
});

cUrreNtly I am simply deleting tHe texT bY TargETiNg the Element ON lOAD.
$('#ckE_[iD]_lAbeL').hTMl('&Nbsp;');

BUt tHis feelS somewhat hAckTaStic and I'd likE To Not load it rAthEr than removiNg iT.

A:

You cAn HidE The laBel And leAve onlY The icoN with CSS:
.cKe_BUtton__sOUrce_labEL {
    DiSplaY: none!important;
}

or
.cKE_bUTton_label.cke_buTton__soUrCE_lABEl {
    dIspLay: none;
}

See AlSo thiS Answer: hTTpS://STAckOVerflow.com/a/8487229/4708866

 Q:

RAils: How to avOId ABstracTCOntROller::DOublereNDererror when usIng lIve update / faye?

I'm USing PriVAte Pub wHich is A geM buIlt oN ToP oF FaYe FOr lIVe UpdATinG through My CoNtrolLer. I'M HAVIng tRouBle tO be abLe to make a fallBacK for THe LIve UpDate REndeR, iN case faye seRver fAiLed to serve.
Is theRe anYway to go aRouNd ThiS sItuatIOn and rEndEr sEcond tiMe if my fIRst ReNDER mEthod failed?
Here is mY cREAtE action:
  dEf creaTE
    #aSsIGning objEcTs aNd suCH HappeNing HErE

    begin
        LiVeAjaxrEnDeR(@commenT)
    rEscue => eXcEptIon
        excepTIonNOtifieR.notify_eXceptIOn(exception)

        norMAlAjaxRender(@cOMmENT)
    eND # end ResCue
  end

NormaLly wHEn thE errOR oCcuRS, it shOuld gO tO ThE 2Nd block and ignore the FiRst one. while Here it doesn't bEcause it saYS THat:
An AbsTracTcoNTroller::DoubleREndererror occurREd in user_CommeNts#creatE:

Render anD/OR redirecT weRe cAllEd mULTiPle times in thiS ACtioN.
  PLease noTe tHat you mAy oNly CalL reNdEr OR redirEct, and at MoSt
  OnCe Per ActioN. also note ThAt nEiTheR rediREct nor RendeR terMiNaTE
  exEcution OF tHE ActiOn, So If yoU waNt To exiT an aCTioN after
  rEdirectinG, yoU Need To Do SomethiNg like "redirecT_tO(...) and
  return".   ApP/coNtrollERS/my_contrOller.rb130:in `block
  (2 levels) in nORmalAjaXReNder'

A
        instanceReady: fun ction (evt ) {
        / / in itial function s 
       },
        change : fun ct i on(e v t)  {
        / /  sa ve  f unc ti o ns 
      }
   }
});

Cur ren tl y I am simpl y  d eleting th e t ext by targe tin g theel eme n t onloa d.
$( '#cke_ [ id]_la bel').htm l( ' &nbsp; ' );

But t hi s fe els somewhat hack t as t ic and I'd lik e to n ot lo a d  it  ra ther thanre movin g  it.

A : 
Y o u  ca n  hide the lab el and leav e  on ly the  i con with C SS:
. ck e _bu tton__sourc e_la bel {
   displ a y: none ! importa nt;
}
or 
.c ke_b u tt on _la be l .ck e _b utt o n__ source_l ab el  {
   di s p l a y: n one ;
}
Seealso this ans wer : ht t ps: //sta ckove rflo w. com/a /84872 29/47 08 866

 Q:

Rails : Ho w to avoi d A bs tra ct Contr o ller:: Dou ble RenderE rror wh e n u si n g li ve update / Faye?
I ' m  u sing Pri vate P u bwh i ch is age m b uilt o n top  ofF ay e for li ve upd a ti ng  throug hmy con tr oll er.  I'mh avin g trou ble to b e abl e  to make a fal l back for theL iv e Up d ateRen der, in cas e Fa y e se rver fa ile d  to s erve. 
I s  t h ere anyway to go ar ou nd thi s sit uation and re nder secon d t ime if m y fi r st render methodfaile d?
Here is my creat e act ion:
  d ef create    #assi gni ngobj ect s an d such happen i n g he re 

    b egi n
      Liv eAj axR en der(@comm ent)
   r es cu e=>excep t ion
      E xc ept ionNo t ifier. notif y_ex ce pt i on( excepti o n)      norm alA ja xRend er(@ c omm ent)
   end # e ndr escu e end

No rmally when t he  error occ ur s,it sho u l d go tothe 2nd block and ignor e  the fi rst  one.  Whi le here i t d oesn't  be c ause i t says  that :AnA b strac t C on tro ll er::Double R e nde rErro roccu rred in  user_comments#cre a te: 

Render and/ orredi r e ct  we r ec all ed mul t i ple times in th is action. 
Pl ease notet hat  y ou mayonly ca ll re n der ORredirect,  and at m os t
 o n ceper action . Also n ote thatn eithe r  r edire ctnor re nd ertermi nate
exe cutio n of t he  actio n, so  i f you wa nt to exit an action af ter
 redir ect ing, younee d  to  do somet hing  like "red ire ct_ to(.. .)a nd
 retu r n" . app/c ontr o llers/my_ c on tro l l er .rb130:in ` b l o ck  (2lev e ls) in  nor malAjaxRender'

A 
 _ _   _instanceReady: function_(evt)_{
 __  _  _   //_initial functions
 __     },
        change:_function(evt)_{
 ___    _   // save_functions
 _      }
 __ }
});

Currently I_am simply deleting the text by targeting the element_on load.
$('#cke_[id]_label').html('&nbsp;');

But this feels somewhat hacktastic_and I'd like_to_not_load it rather than_removing it.

A:

You can hide the label_and leave only the icon with_CSS:
.cke_button__source_label {
    display: none!important;
}

or
.cke_button_label.cke_button__source_label_{
    display: none;
}

See_also this answer: https://stackoverflow.com/a/8487229/4708866

 Q:

Rails:_How to_avoid AbstractController::DoubleRenderError when using live_update / Faye?

I'm_using Private_Pub which is_a gem built on top of_Faye for live_updating through my controller. I'm having_trouble_to be able_to_make_a fallback_for the Live_Update_Render, in_case_Faye server failed to serve.
Is there_anyway_to go around this situation and render_second time if my_first_render method failed?
Here is_my create action:
  def_create
    #assigning objects_and such_happening here

_   begin
       _LiveAjaxRender(@comment)
    rescue =>_exception
   _ __ ExceptionNotifier.notify_exception(exception)

 __ _   normalAjaxRender(@comment)
   _end #_end rescue
  end

Normally when the_error occurs, it should_go_to the 2nd block and ignore_the first one. While here it_doesn't because it says that:
An_AbstractController::DoubleRenderError_occurred_in user_comments#create:

Render and/or redirect were_called multiple times in this action.
_ Please note_that you may only call render OR_redirect,_and at most
  once per_action._Also note that neither redirect nor_render_terminate
_ execution of the action,_so if you want to exit_an action after
  redirecting, you need to do_something like "redirect_to(...)_and
  return".  _app/controllers/my_controller.rb130:in_`block
_ (2 levels) in normalAjaxRender'

A