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 about 9 years ago
10
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
                                                                          English Vocabulary
                                                                          Niat Habtemariam
                                                                          GCSE Biology Quiz
                                                                          joannaherbert
                                                                          A Level: English language and literature technique = Dramatic terms
                                                                          Jessica 'JessieB
                                                                          Of Mice and Men
                                                                          becky_e
                                                                          P2 Radioactivity and Stars
                                                                          dfreeman
                                                                          Edexcel Biology chapter 1
                                                                          Anna Bowring
                                                                          Rights and Responsibilities Flashcards - Edexcel GCSE Religious Studies Unit 8
                                                                          nicolalennon12
                                                                          AS Biology Unit 1
                                                                          lilli.atkin
                                                                          GCSE REVISION TIMETABLE
                                                                          nimraa422
                                                                          10 good study habits every student should have
                                                                          Micheal Heffernan