So I'm having an interesting issue with my database and associations.
I have three models, Users, Groups, and Roles. They are connected via
a join table that has user_id, group_id, and role_id on the same table.
A user is in a group, with a role. The same user can be in another
group with
So I have recently tried authenticating to a cas server for a project,
and every time I try to access my cas server it returns
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
certificate verify failed
Now I am using the CAS gem found here
Franz Strebel wrote:
last_id = MyModel.find(:first, :order = 'id desc').id
@Franz
Thanks this worked great well kinda, I'm confused on why there is the
'.id' at the end also how would I limit this to give me say the first 3
from the back of the list instead of
:all or :first and :limit = 3
To all that have helped out thank you I do have what i wanted to
accomplished though it may not be super efficient it does what i need
with no repeats from my tests here is what i have done.
index.html.erb
%
I am new to both ruby and rails and a recent project I am trying has got
me working on it. I am trying to find a nice easy lightweight way to
find the last 'id' in a mysql database so I can take it and use it as
the upper bound in a random number generator.
My problem is that I haven't found an
I am new to RoR, and I am just starting out, but I am having massive
problems doing what should be a painless install. I am running a windows
machine and I have ruby installed as well as gems.
When I try to do the command
gem install rails
I get
c:\Ruby19gem install rails
ERROR: While executing
Eric B. wrote:
I am new to RoR, and I am just starting out, but I am having massive
problems doing what should be a painless install. I am running a windows
machine and I have ruby installed as well as gems.
When I try to do the command
gem install rails
I get
c:\Ruby19gem install rails
7 matches
Mail list logo