Module: Opinio
- Defined in:
- lib/opinio.rb,
lib/opinio/rails.rb,
lib/opinio/schema.rb,
lib/opinio/railtie.rb,
lib/opinio/version.rb,
lib/opinio/opinio_model.rb,
lib/opinio/opinio_subjectum.rb,
lib/opinio/orm/active_record.rb,
lib/opinio/controllers/helpers.rb,
lib/opinio/controllers/replies.rb,
lib/opinio/controllers/extensions.rb,
lib/opinio/opinio_model/validations.rb,
lib/opinio/controllers/internal_helpers.rb,
lib/generators/opinio/views/views_generator.rb,
lib/generators/opinio/install/install_generator.rb
Defined Under Namespace
Modules: Controllers, Generators, OpinioModel, OpinioSubjectum, Orm, Schema
Classes: CommentsController, Engine, Railtie, Version
Constant Summary
collapse
- @@model_name =
"Comment"
- @@owner_class_name =
"User"
- @@use_title =
false
- @@accept_replies =
false
- @@custom_identifiers =
Array.new
false
- @@destroy_conditions =
Proc.new { false }
- @@current_user_method =
:current_user
- @@strip_html_tags_on_save =
true
- @@sort_order =
'DESC'
- @@set_flash =
true
Class Method Summary
collapse
Class Method Details
.check_custom_identifiers(params) ⇒ Object
59
60
61
62
63
64
65
|
# File 'lib/opinio.rb', line 59
def self.check_custom_identifiers(params)
self.custom_identifiers.each do |identifier|
identified = identifier.call(params)
return identified unless identified.nil?
end
nil
end
|
.opinio_identifier(block) ⇒ Object
51
52
53
|
# File 'lib/opinio.rb', line 51
def self.opinio_identifier(block)
@@custom_identifiers << block
end
|
.set_destroy_conditions(&block) ⇒ Object
55
56
57
|
# File 'lib/opinio.rb', line 55
def self.set_destroy_conditions(&block)
@@destroy_conditions = block
end
|
.setup {|_self| ... } ⇒ Object
47
48
49
|
# File 'lib/opinio.rb', line 47
def self.setup
yield self
end
|