Module: BigBrotha

Defined in:
lib/bigbrotha/models/taboo.rb,
lib/bigbrotha.rb,
lib/bigbrotha/censor.rb,
lib/bigbrotha/config.rb,
lib/bigbrotha/errors.rb,
lib/bigbrotha/version.rb,
lib/bigbrotha/models/taboo_post.rb,
lib/bigbrotha/models/taboo_posts_taboo.rb,
lib/generators/big_brotha/initializer_generator.rb,
lib/generators/big_brotha/active_admin_generator.rb

Overview

create_table :taboo_posts do |t|

t.text :content
t.string :content_column
t.belongs_to :user
t.timestamps

end

Defined Under Namespace

Classes: ActiveAdminGenerator, Censor, Config, Error, InitializerGenerator, MissingParam, NotActiveRecordModel, Taboo, TabooPost, TabooPostsTaboo

Constant Summary collapse

VERSION =
"0.1.18"

Class Method Summary collapse

Class Method Details

.add_taboo!(keyword) ⇒ Object



16
17
18
# File 'lib/bigbrotha.rb', line 16

def self.add_taboo!(keyword)
  Taboo.create!(keyword: keyword)
end

.configure {|Config.new| ... } ⇒ Object

Yields:



12
13
14
# File 'lib/bigbrotha.rb', line 12

def self.configure
  yield(Config.new)
end

.find_taboo(keyword) ⇒ Object



24
25
26
# File 'lib/bigbrotha.rb', line 24

def self.find_taboo(keyword)
  Taboo.find_by(keyword: keyword)
end

.remove_taboo(keyword) ⇒ Object



20
21
22
# File 'lib/bigbrotha.rb', line 20

def self.remove_taboo(keyword)
  Taboo.destroy_all(keyword: keyword)
end