Changed production settings for sendgrid
This commit is contained in:
parent
9643de5d56
commit
d90351b82c
1
Gemfile
1
Gemfile
|
@ -93,6 +93,7 @@ group :test, :development do
|
|||
gem 'pry-debugger'
|
||||
gem 'debugger'
|
||||
gem 'faker'
|
||||
gem 'puma'
|
||||
# gem "sunspot-rails-tester"
|
||||
gem 'database_cleaner' #Strategies for cleaning databases. Can be used to ensure a clean state for testing.
|
||||
gem "rspec", "~> 2.0"
|
||||
|
|
|
@ -71,7 +71,7 @@ Orbit::Application.configure do
|
|||
:domain => "new.tp.rulingcom.com",
|
||||
:authentication => "plain",
|
||||
:user_name => "rulingcom",
|
||||
:password => "rulingbjo4xjp6"
|
||||
:password => "bjo4xjp6"
|
||||
}
|
||||
|
||||
end
|
||||
|
|
|
@ -15,7 +15,6 @@ module OrbitTag
|
|||
|
||||
has_many :taggings, as: :taggable, autosave: true, dependent: :destroy
|
||||
accepts_nested_attributes_for :taggings, allow_destroy: true
|
||||
# after_save :remove_taggings, unless: Proc.new{self.tags_to_destroy.blank?}
|
||||
end
|
||||
send :include, InstanceMethods
|
||||
end
|
||||
|
|
|
@ -120,40 +120,12 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||
# PUT /bulletins/1.xml
|
||||
|
||||
def update
|
||||
|
||||
@bulletin = Bulletin.find(params[:id])
|
||||
|
||||
# @bulletin.image.clear if params[:bulletin][:image_del] == '1'
|
||||
# if params[:bulletin][:image_del] == '1'
|
||||
# @bulletin.remove_image!
|
||||
# @bulletin.image_del = nil
|
||||
# params[:bulletin][:image_del] = nil
|
||||
# end
|
||||
|
||||
delete_out_invalid_date_from_params
|
||||
respond_to do |format|
|
||||
if @bulletin.update_attributes(params[:bulletin])
|
||||
tag = []
|
||||
length = (@bulletin.tag_ids.length / 2)
|
||||
@bulletin.tag_ids.each do |t|
|
||||
tag << t.to_s
|
||||
end
|
||||
@bulletin.set(:tagged_ids, tag.take(length))
|
||||
# if(is_manager? || is_admin?)
|
||||
# @bulletin.is_checked = true
|
||||
# @bulletin.is_rejected = false
|
||||
# @bulletin.de_pending!
|
||||
# end
|
||||
# if (params[:bulletin][:is_checked] == "false")
|
||||
# @bulletin.is_rejected = true
|
||||
# @bulletin.save!
|
||||
# end
|
||||
# if (@bulletin.deadline < @bulletin.postdate rescue nil)
|
||||
# @bulletin.deadline = nil
|
||||
# @bulletin.update_user_id = current_user.id
|
||||
# @bulletin.save!
|
||||
# end
|
||||
# format.html { redirect_to(panel_announcement_back_end_bulletin_url(@bulletin), :notice => t('bulletin.update_bulletin_success')) }
|
||||
if @bulletin.update_attributes(params[:bulletin])
|
||||
|
||||
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('bulletin.update_bulletin_success')) }
|
||||
format.js { render 'toggle_enable' }
|
||||
format.xml { head :ok }
|
||||
|
|
|
@ -38,6 +38,7 @@ class Bulletin
|
|||
accepts_nested_attributes_for :bulletin_links, :allow_destroy => true
|
||||
|
||||
validates :title, :at_least_one => true
|
||||
after_save :get_bulletin_tags
|
||||
|
||||
def to_indexed_json
|
||||
self.to_json
|
||||
|
@ -66,6 +67,16 @@ class Bulletin
|
|||
self.category
|
||||
end
|
||||
|
||||
def get_bulletin_tags
|
||||
if self.changed?
|
||||
tag = []
|
||||
tag << self.tags.map{|t| t.id.to_s}.uniq
|
||||
# Rails.logger.info"@@@@@@@@@@@@@@@@"+tag.inspect
|
||||
self.tagged_ids = tag
|
||||
# self.upsert
|
||||
end
|
||||
end
|
||||
|
||||
def share_item
|
||||
Item.first(conditions:{name: 'announcement'})
|
||||
end
|
||||
|
|
Reference in New Issue