Aha! I've figured it out.
In case anyone else is wondering, I have a current_user defined in
sessions helper, so, I had to include sessionshelper, and set @user =
current_user!
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Gro
I wanted to pass it the id of the logged in user. I have some things
that I want to show up for some users and not for others. I wanted to
use @user.admin? for this, which works fine on the users pages.
however, since I can't get the @user assignment to work for pages this
isn't working eithe
I realize the title probably doesn't make much sense, but that was the
best short description I could come up with.
Anyway, I have users and pages in my site, and was using the following
code in the users controller, which works fine:
def show
@user = User.find(params[:id])
@title = @u
Rajinder Yadav wrote in post #959273:
> On 10-11-02 04:00 AM, Nathan Domier wrote:
>> Hi,
>>
>> I'm completely new to ruby and working my way through the tutorial on
>> http://www.tutorialspoint.com/ruby-on-rails-2.1/
>>
>
> don't waste your time
Lunks wrote in post #958901:
> You should not install rails from the Ubuntu repository. It is usually
> an
> older version. Just install ruby, install rubygems, then do a gem
> install
> rails. It should be on 3.0.
>
> Also, you most surely doesn't need Apache to try it out. Once everything
> is
>
ok, I'm completely frustrated with the install process for gems and
rails \.
apt-get install rubygems1.9.1 seems to work, but when I try to run gem,
it says it's not installed.
To get gem to work, I have to apt-get ruby, which installs 1.8, instead
of 1.9, yet enables the gem command.
Then, g
> Could you not top post please, and remember to quote the email you are
> replying to, otherwise it is difficult to follow the thread
Sorry, what is top posting?
> If you want to move to rails 3 I would suggest forgetting about that
> app and starting again with rails 3.
Alright, the app was ju
> Then please use a 2.3 tutorial. You'll only get frustrated if you try
> to use a 2.1 tutorial with Rails 2.3.
I'd like to use rails 3 if that's the most recent, I'm just trying to
get everything set up at the moment anyway.
>From your description, I'd be looking first at your webserver (Apach
Interesting, rails -v gave me 2.3.5, so I tried running 'gem update
rails' which gave me 'Nothing to update'
Then I tried 'gem install rails' which put several folders into
/var/lib/gems/1.8/gems/ including a "rails-3.0.1" folder, get rails -v
still gives me 2.3.5 and gem update rails still giv
Hi,
I'm completely new to ruby and working my way through the tutorial on
http://www.tutorialspoint.com/ruby-on-rails-2.1/
I've made a few pages to use, but when I open them in a web browser all
I see is code.
For instance, my new.html.erb, the code of which is:
-
Add n
10 matches
Mail list logo