Tags » Joe Smith

Calling the username of a devise user model in rails when trying to show ownership of posts/comments?

I have a devise User model with the username:string attribute added in. Posts belong to a User and Comments belong to a post and a user. 192 more words

Stackoverflow

Regex URI portion: Remove hyphens

I have to split URIs on the second portion:

/directory/this-part/blah

The issue I’m facing is that I have 2 URIs which logically need to be one… 55 more words

Stackoverflow

How to define upvote/downvote when using acts_as_votable for comments?

I have my comments resource nested in my posts resource, and both resources act_as_votable.

How would I go about defining upvote/downvote? Here is how I am doing it now(comments controller) : 240 more words

Stackoverflow

Getting error when linking to nested resources in my index.html.erb?

I just tried giving Posts’ comments the ability to be voted up or down by signed in users. A comment’s “post_id” identifies it with a Post, and I am getting this error message (I believe the problem is in index.html.erb which can be seen at the bottom of the description): 347 more words

Stackoverflow

Having trouble with comment to post polymorphic url's?

I just tried giving Posts’ comments the ability to be voted up or down by signed in users. A comment’s “post_id” identifies it with a Post, and I am getting this error message: 313 more words

Stackoverflow

Can't figure out rails 4 error related to strong parameters and nested resources?

My rails 4 application is throwing me an error about my strong parameters:

syntax error, unexpected ‘:’, expecting ‘)’ params.require(:comment).permit(:body :post_id)

Note : (there is an arrow pointing at “comment”) 50 more words

Stackoverflow

Moustakas' 11th-Inning Homer Carries Royals Past Angels

ANAHEIM (AP) — Mike Moustakas homered to lead off the 11th inning, and the Kansas City Royals kept rolling in their first postseason in 29 years with a 3-2 victory over the Los Angeles Angels in their AL Division Series opener Thursday night. 951 more words

Sports