RailsCasts Pro episodes are now free!

Learn more or hide this

Nathaniel Watts's Profile

GitHub User: thewatts

Comments by Nathaniel Watts


I may be confused on the Twitter Secret & Consumer keys... but should these values be stored in a hash?

In the unfortunate event of a database being hacked - wouldn't that give access to post on user's Twitter accounts?


I've actually been having troubles storing the tweets in the database. With using postgresql, I get this error:

: SELECT 1 AS one FROM "tweets" WHERE "tweets"."tweet_id" = 222042501954019328 LIMIT 1
ActiveRecord::StatementInvalid: PGError: ERROR: operator does not exist: character varying = bigint

I had to actually declare the table creation differently.

class CreateTweets < ActiveRecord::Migration
  def change
    create_table :tweets, :id => false do |t|
      t.integer :tweet_id, :limit => 8
      t.string :twitter_name
      t.text :content


per this article: http://moeffju.net/blog/using-bigint-columns-in-rails-migrations

Not sure if this is the best method - but currently working on my end!