Ruby on Rails Tuesday, May 1, 2012

On 1 May 2012 10:34, Satyajit Sarangi <writetosatyajit@gmail.com> 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.

No comments:

Post a Comment