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
# looks like command to Create/Update/Delete(Publish, Reject and etc) and Query object | |
class Post < ActiveRecord::Base | |
before_validate :build_from_template # if update don't run | |
before_create :check_content_uniq # extremely long time also don't run on update | |
after_update :send_notification # sometimes don't run | |
after_create :add_editor # sometimes don't run, can touch another record that has callbacks too :D | |
after_save :broadcast # sometimes don't run | |
after_create :run_indexing # sometimes don't run | |
private |
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
import rest from 'helpers/rest'; | |
function initiateEntityRequest(requestType, entityName, requestParams) { | |
return { | |
type: `REQUEST_ENTITY_${R.toUpper(requestType)}_${R.toUpper(entityName)}`, | |
requestParams, | |
requestType, | |
entityName, | |
isRemoteDataAction: true, | |
isPending: true, |