Wiki App

Description

Mind Map on Wiki App, created by joshuazap on 06/01/2016.
joshuazap
Mind Map by joshuazap, updated more than 1 year ago
joshuazap
Created by joshuazap almost 9 years ago
8
0

Resource summary

Wiki App
  1. Users
    1. data Model
      1. Devise
        1. :confirmable
          1. :database_authenticatable
            1. :registerable
              1. :recoverable
                1. :rememberable
                  1. :trackable
                    1. :validatable
                    2. have and belong to many wikis (through collaborators)
                      1. validates :username (string), presence: true
                        1. id (integer)
                          1. app/models/user.rb
                            1. def collaborators: Collaborator.where(user_id: id)
                              1. def wikis: collaborators.wikis
                            2. Controller
                              1. View
                              2. Wikis
                                1. data Model
                                  1. default_scope { order(:title ASC' }
                                    1. validates :body (string/markdown), presence: true
                                      1. validates :private (boolean), presence: true
                                        1. default t.boolean :private
                                        2. validates :title (string), presence: true
                                          1. id (integer)
                                            1. has many users through collaborators
                                              1. app/models/wiki.rb
                                                1. has_many :collaborators
                                                  1. def users: collaborators.users
                                                    1. delegate :users, to: collaborators
                                                    2. belongs to user (user that created it)
                                                    3. Controller
                                                      1. index, show, new, create, destroy
                                                        1. private: def wiki_params
                                                        2. View
                                                          1. Private wikis
                                                            1. visible to: admins, @wiki.user, @wiki.collaborator
                                                            2. Public wikis
                                                              1. visible to: everyone
                                                          2. Application Controller
                                                            1. before_action :authenticate_user!
                                                            2. Collaborators
                                                              1. data Model
                                                                1. user_id (integer)
                                                                  1. wiki_id (integer)
                                                                    1. id (integer)
                                                                      1. app/models/collaborator.rb
                                                                        1. def self.wikis: Wiki.where( id: pluck(:wiki_id) )
                                                                          1. def self.users: User.where( id: pluck(:user_id) )
                                                                            1. def wiki: Wiki.find(wiki_id)
                                                                              1. def user: User.find(user_id)
                                                                          Show full summary Hide full summary

                                                                          Similar

                                                                          Bloc testing
                                                                          Sanny Lin
                                                                          Jekyll and Hyde
                                                                          elliesussex
                                                                          Cell Structure
                                                                          daniel.praecox
                                                                          OCR AS Biology - Lipids
                                                                          Chris Osmundse
                                                                          GCSE AQA Citizenship Studies: Theme 1
                                                                          I Turner
                                                                          A-level Maths: Key Differention Formulae
                                                                          Andrea Leyden
                                                                          AQA Biology B1 Questions
                                                                          Bella Statham
                                                                          GCSE AQA Chemistry Atomic Structure and Bonding
                                                                          mustafizk
                                                                          Forms of Business Ownership Quiz
                                                                          Noah Swanson
                                                                          Pathos in Battle
                                                                          mouldybiscuit
                                                                          Salesforce Admin 201 Test Chunk 4 (91-125)
                                                                          Brianne Wright