app/controllers/brands_controller.rb
# default water mark creation for each new brand.
default water mark creation for each new brand.
default water mark creation for each new brand .
def create_default_watermark
      @watermark = Watermark.new
      @watermark.brand_id = @brand.id
      @watermark.name = "Studio Watermark"
      @watermark.text_name = current_user.studio_name
      @watermark.font_set = "Adler"
      @watermark.color = "Black"
      @watermark.text_opacity_value = 30
      @watermark.selected_as = true
      @watermark.is_default = true
      @watermark.is_first = true
      image1 = create_image_watermark("#{Rails.root}/app/assets/images/demo (1).jpg","Adler",\
          "Black",current_user.studio_name,30)
      image2 = create_image_watermark("#{Rails.root}/app/assets/images/demo.jpg","Adler",\
          "Black",current_user.studio_name,30)
      @watermark.watermark_image = image1
      @watermark.watermark_sample_image = image2
      @watermark.save!
    end
def create_default_watermark @watermark = Watermark . new @watermark . brand_id = @brand . id @watermark . name = "Studio Watermark" @watermark . text_name = current_user . studio_name @watermark . font_set = "Adler" @watermark . color = "Black" @watermark . text_opacity_value = 30 @watermark . selected_as = true @watermark . is_default = true @watermark . is_first = true image1 = create_image_watermark ( "#{Rails.root}/app/assets/images/demo (1).jpg" , "Adler" , "Black" , current_user . studio_name , 30 ) image2 = create_image_watermark ( "#{Rails.root}/app/assets/images/demo.jpg" , "Adler" , "Black" , current_user . studio_name , 30 ) @watermark . watermark_image = image1 @watermark . watermark_sample_image = image2 @watermark . save! end
default water mark creation for each new brand.
default water mark creation for each new brand .