Module: Recourse
- Defined in:
- lib/recourse.rb,
lib/recourse/icons.rb,
lib/recourse/engine.rb,
lib/recourse/routes.rb,
lib/recourse/helpers.rb,
lib/recourse/version.rb,
lib/recourse/recoursive.rb,
lib/recourse/controllers.rb,
lib/recourse/helpers/cells.rb,
lib/recourse/helpers/fields.rb,
lib/recourse/helpers/examples.rb,
lib/recourse/helpers/comboboxes.rb,
lib/recourse/helpers/navigation.rb,
lib/recourse/helpers/references.rb,
lib/recourse/helpers/constraints.rb
Overview
Namespace for the gem: the routes.rb DSL and the screens it mounts.
Defined Under Namespace
Modules: Controllers, Helpers, Recoursive, Routes Classes: Engine, Error
Constant Summary collapse
- NAVIGATION_ICONS =
Bootstrap Icons name for a resource title, keyed by the title as it displays.
{ 'Agents' => 'robot', 'Answers' => 'question-circle', 'Apps' => 'window', 'Assessments' => 'clipboard-check', 'Bookings' => 'calendar-check', 'Brands' => 'buildings', 'Campaigns' => 'megaphone', 'Contacts' => 'person-rolodex', 'Contract' => 'file-earmark-check', 'Conversations' => 'chat-dots', 'Counties' => 'map', 'CRM' => 'plugin', 'Echoes' => 'soundwave', 'Episodes' => 'collection-play', 'Evaluations' => 'speedometer2', 'Franchises' => 'shop', 'Home' => 'house', 'Locations' => 'geo-alt', 'Logout' => 'box-arrow-right', 'Markets' => 'pin-map', 'Offer questions' => 'gift', 'Optimizations' => 'sliders', 'Platforms' => 'plugin', 'Profile' => 'person-circle', 'Prompts' => 'terminal', 'Providers' => 'briefcase', 'Satisfaction questions' => 'emoji-smile', 'Searches' => 'search', 'Settings' => 'gear', 'Sources' => 'signpost', 'Specialties' => 'award', 'Specialty matches' => 'award', 'States' => 'geo', 'Verticals' => 'bar-chart', 'ZIPs' => 'geo-alt-fill', }.freeze
- FALLBACK_ICON =
Shown when a resource is not in the map, so a list of links stays aligned.
'circle'- VERSION =
Version of the gem, read by the gemspec and by hosts checking compatibility.
'0.1.0'
Class Attribute Summary collapse
-
.declared ⇒ Object
readonly
Resources
recourseshas drawn, in the order config/routes.rb lists them.
Class Method Summary collapse
-
.declare(name) ⇒ Object
Records a resource as declared, keeping order and ignoring a repeated draw.
-
.editable_columns(model) ⇒ Object
Columns a user may set: the form offers these and
createpermits these.
Class Attribute Details
.declared ⇒ Object (readonly)
Resources recourses has drawn, in the order config/routes.rb lists them.
14 15 16 |
# File 'lib/recourse.rb', line 14 def declared @declared end |
Class Method Details
.declare(name) ⇒ Object
Records a resource as declared, keeping order and ignoring a repeated draw.
20 21 22 |
# File 'lib/recourse.rb', line 20 def self.declare(name) @declared << name.to_s unless @declared.include? name.to_s end |
.editable_columns(model) ⇒ Object
Columns a user may set: the form offers these and create permits these.
25 26 27 |
# File 'lib/recourse.rb', line 25 def self.editable_columns(model) model.column_names - %w[id created_at updated_at] end |