This is my environment.rb

# Load the rails application
require File.expand_path('../application', __FILE__)

# Initialize the rails application
Qstack::Application.initialize!
require 'koala'

This is my application_controller.rb

class ApplicationController < ActionController::Base
# protect_from_forgery

before_filter :parse_facebook_cookies
def parse_facebook_cookies
@facebook_cookies =
Koala::Facebook::OAuth.new.get_user_info_from_cookie(cookies)
end
end

This is my login_controller.rb

class LoginController < ApplicationController
def index
graph =
Koala::Facebook::GraphAPI.new(@facebook_cookies["access_token"])
@likes = graph.get_connections("me", "likes")
end

I am using Rails 3 and the error I am getting is this: uninitialized
constant LoginController in Ruby.

I did rake routes and got this:

home_index GET /home/index(.:format) home#index
login_index GET /login/index(.:format) login#index

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Colin Law at May 1, 2012 at 2:46 pm

    On 1 May 2012 10:34, Satyajit Sarangi wrote:
    This is my environment.rb

    # Load the rails application
    require File.expand_path('../application', __FILE__)

    # Initialize the rails application
    Qstack::Application.initialize!
    require 'koala'

    This is my application_controller.rb

    class ApplicationController < ActionController::Base
    # protect_from_forgery

    before_filter :parse_facebook_cookies
    def parse_facebook_cookies
    @facebook_cookies =
    Koala::Facebook::OAuth.new.get_user_info_from_cookie(cookies)
    end
    end

    This is my login_controller.rb
    Which folder is that file in?
    class LoginController < ApplicationController
    def index
    graph =
    Koala::Facebook::GraphAPI.new(@facebook_cookies["access_token"])
    @likes = graph.get_connections("me", "likes")
    end

    I am using Rails 3 and the error I am getting is this: uninitialized
    constant LoginController in Ruby.
    Where and when do you get that error. Is there an indication of which
    line of code causes the error?

    Colin
    I did rake routes and got this:

    home_index GET /home/index(.:format)  home#index
    login_index GET /login/index(.:format) login#index

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMay 1, '12 at 1:53p
activeMay 1, '12 at 2:46p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Colin Law: 1 post Satyajit Sarangi: 1 post

People

Translate

site design / logo © 2021 Grokbase