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
def comment | |
@comment = @post.comments.create(comment_params) | |
@comment[:state]= "approved" | |
@comment[:spam]= false | |
if @comment.valid? | |
if Comment::Moderation.enabled? or @comment.ham? | |
begin | |
CommentMailer.notification(@comment, request).deliver_now |
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
Sass::SyntaxError in Static_pages#home | |
Showing /home/gen/upwork/dunno/globalagritrends.com.code (1)/app/views/layouts/application.html.haml where line #12 raised: | |
".content table" failed to @extend ".table". | |
The selector ".table" was not found. | |
Use "@extend .table !optional" if the extend should be able to fail. | |
(in /home/gen/upwork/dunno/globalagritrends.com.code (1)/app/assets/stylesheets/layout.css.scss.erb) |
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
require 'nokogiri' | |
t = ('<div class="listing"> | |
<div class="row"> | |
<span class="left">Title:</span> | |
<span class="right">The Well-Grounded Rubyist</span> | |
</div> | |
<div class="row"> | |
<span class="left">Author:</span> | |
<span class="right">David A. Black</span> | |
</div> |
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
# be sure to comment out the require 'capistrano/deploy' line in your Capfile! | |
# config valid only for Capistrano 3.1 | |
lock '3.2.1' | |
set :application, 'my-cool-application' | |
# the base docker repo reference | |
set :name, "johns-stuff/#{fetch(:application)}" |
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
#require 'rubygems' | |
#require 'Celerity' | |
require 'nokogiri' | |
require 'watir-webdriver' | |
require "open-uri" | |
#b.goto 'bit.ly/watir-webdriver-demo' | |
#b.text_field(:id => 'entry_1000000').set 'your name' | |
#b.select_list(:id => 'entry_1000001').select 'Ruby' | |
#b.select_list(:id => 'entry_1000001').selected? 'Ruby' |
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
# == Schema Information | |
# | |
# Table name: users | |
# | |
# *id*:: <tt>integer, not null, primary key</tt> | |
# *email*:: <tt>string, default(""), not null</tt> | |
# *encrypted_password*:: <tt>string, default(""), not null</tt> | |
# *reset_password_token*:: <tt>string</tt> | |
# *reset_password_sent_at*:: <tt>datetime</tt> | |
# *remember_created_at*:: <tt>datetime</tt> |
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 CreatePermissions < ActiveRecord::Migration | |
def change | |
create_table :permissions do |t| | |
t.integer :publisher_id | |
t.integer :channel_id | |
t.timestamps null: false | |
end | |
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
require 'rails_helper' | |
describe History ,type: :model do | |
let(:member){ create(:member) } | |
let(:channel){ create(:channel) } | |
let(:create_sub){create(:subscription )} | |
it 'should be created after subscribe' do | |
expect{create_sub}.to change{History.count}.by(1) | |
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
require 'rails_helper' | |
describe "the signin process", :type => :feature do | |
before :each do | |
AdminUser.create(:email => 'user@example.com', :password => 'password') | |
end | |
let(:sign_in) { visit '/admin' | |
within("#session_new") do | |
fill_in 'Email', :with => 'user@example.com' | |
fill_in 'Password', :with => 'password' |
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
<%= message.subject %> | |
<%= message.render_body.html_safe %> | |
<%= message.published_at%> | |
OlderNewer