This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## RSpec favorites_controller.rb | |
require 'spec_helper' | |
describe FavoritesController do | |
before :each do | |
@bookmark = create(:bookmark) | |
@favorite = create(:favorite) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe BookmarksController do | |
before :each do | |
@bookmark = create(:bookmark) | |
@user = create(:user) | |
end | |
describe "GET #show" do | |
it "assigns the requested bookmark to @bookmark" do | |
get :show, id: @bookmark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEVISE | |
1. How to you get .update_attribute(:email, "new email") to work in rails console? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. WRITE TESTS FOR THE CONTROLLER - YOU'VE LEARNED ABOUT TESTING MODELS, NOW TEST THE CONTROLLERS!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdsdfsfd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. When dealing with multiple instances of a class, or trying to grab all the instances of a class, (as with top_rated) it's important to ensure the database is properly cleaned between tests. We'll use the database_cleaner for that. | |
2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdsdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Requirements: | |
1. Want to enable users to have a public profile page, where they can share: | |
a. Posts | |
b. Comments | |
2. Constrained by what topics are publicly viewable. | |
3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Here are some things we missed: | |
1. We should redirect users to the topics view after they sign-in; | |
2. The current password field should be removed from registration/edit so that users signing-in via Facebook can update their information without entering a password; | |
3. If a user has previously voted, we should change the up/down arrow icon to reflect that they have voted; | |
4. We'll take a look at updating a couple of default bootstrap colors; | |
5. We need to check that we have the proper permissions before sending emails based on favorited posts. | |
###Removing Password Requirements -To simplify the Edit User form (remove the password confirm field) and to remove password fields from FaceBook authenticated users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Blocks - seen it dozens of times: | |
a. Basic | |
``` a = [1,2,3] | |
a.map! do |n| | |
n**2 | |
end | |
=> [1,4,9] | |
"Sending the map! method to an array instance with a block of code | |
``` | |
b. Yield |
NewerOlder