Let\'s say that I have a model called Tweet with the following fields
In your case, It returns a collection of object of Active Record Relation
so for specific record
@original.first.id
gives you 64
or
@tweet = Tweet.find(64)
@tweet.id #64
@tweet.content # "Unde et nisi blanditiis vel occaecati soluta praes..."
It's because where returns a collection not a single object
So instead of
@tweet = Tweet.where(id: 64)
You want
@tweet = Tweet.find(64)
because you're using the id
@original is not a Tweet instance but an ActiveRecord::Relation
If you want to access the id of your Tweet directly you should define @original like this
@original = Tweet.find_by_id(64)
or
@original = Tweet.where(id: 64).first
Do this instead, you need to add first
@tweet = Tweet.where(id: 64).first