Module: PgMorph::Naming
- Included in:
- Polymorphic
- Defined in:
- lib/pg_morph/naming.rb
Instance Method Summary collapse
- #before_insert_fun_name ⇒ Object
- #before_insert_trigger_name ⇒ Object
- #column_name_id ⇒ Object
- #column_name_type ⇒ Object
- #proxy_table ⇒ Object
- #type ⇒ Object
Instance Method Details
#before_insert_fun_name ⇒ Object
20 21 22 |
# File 'lib/pg_morph/naming.rb', line 20 def before_insert_fun_name "#{parent_table}_#{column_name}_fun" end |
#before_insert_trigger_name ⇒ Object
24 25 26 |
# File 'lib/pg_morph/naming.rb', line 24 def before_insert_trigger_name "#{parent_table}_#{column_name}_insert_trigger" end |
#column_name_id ⇒ Object
12 13 14 |
# File 'lib/pg_morph/naming.rb', line 12 def column_name_id "#{column_name}_id" end |
#column_name_type ⇒ Object
8 9 10 |
# File 'lib/pg_morph/naming.rb', line 8 def column_name_type "#{column_name}_type" end |
#proxy_table ⇒ Object
16 17 18 |
# File 'lib/pg_morph/naming.rb', line 16 def proxy_table "#{parent_table}_#{child_table}" end |
#type ⇒ Object
4 5 6 |
# File 'lib/pg_morph/naming.rb', line 4 def type child_table.to_s.singularize.camelize end |