Brittany Hicks


160 Experience
1 Lesson Completed
0 Questions Solved


Posted in How do I submit multiple checked items?

Hey guys!
I think this might be the episode you're looking for...
Hope it helps! :)

Posted in Solving FizzBuzz in Ruby Discussion

Gotcha. :) Thanks Chris!

Posted in Solving FizzBuzz in Ruby Discussion

Okay I'm hitting an error and I understand what it's saying but I'm more confused as to why it's happening.

`def fizzbuzz(start_num, end_num)
start_num.upto(end_num) do |n|
str = ""
str += "fizz" if n % 3 == 0
str += "buzz" if n % 5 == 0
str += n if str.empty?
puts str

fizzbuzz(1, 100)`

And when I run it....
`assessment_109.rb:7:in `+': no implicit conversion of Fixnum into String (TypeError)`

Changing the += to a = in the last line works (and since it's an empty string, it outputs the same)

Did anyone else run into this?
Is this just a typo that I'm over thinking or am I completely missing something here?

Thanks! :)

Posted in Updating Forum_Posts getting routes error

Try to run rake routes and double check you have the correct route name. And it doesn't look like you allowing the user_id in your strong params. Try changing to:

def forum_post_params
  params.require(:forum_post).permit(:body, :user_id)

And I'm not 100% positive but I'm pretty sure you don't have to reset the user in your edit method since you're assigning it when it's created. Might cause an issue if someone other than the original user tries to edit the post.
Hope this helps. :)

Posted in let users edit their own posts

You should take a look at his episode on the pundit gem. Sounds like exactly what you need. :)

Have you considered using the apartment gem and creating a new tenant when a new user is added? I have a similar situation in my project for subdomains but it with domains as well.