Displaying 20 results from an estimated 3000 matches similar to: "App_Controller and partial issues with has_many through"
2006 May 10
1
Validates_uniqueness_of multiple field combo?
Hello,
I am new to Ruby on rails and this is therefore probably trivial. Lets
say I have 3 tables - users[id,name, age, ...],
interests[id,name,description, ...], and finally a table
user_interests[id,user_id,interest_id] to link a user to a set of
interests. Now there is no problem to put validates_uniqueness_of :name
in the user-model to ensure that I only have one Lenny, but how do I
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
Hi,
I just installed Rails 2.0.2
[root@mymachine easyx]# ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
[root@mymachine easyrx]# gem install rails --include-dependencies
Need to update 16 gems from http://gems.rubyforge.org
................
complete
Successfully installed rails-2.0.2
[root@remandev easyrx]#
But I''m getting this error in my restful_authentication
2006 Oct 31
1
Help with DRY. I feel like im doing more then I have to.
Throughout my Message controller, I do this a lot:
@message = Message.find(params[:id],:conditions => ["user_id = ?",
@session[''user''].id])
Since you need to authenticate to use this app, is there a way i can
tie the Accounts model in with the Message model so I dont have to pass
in the user_id everytime?
--~--~---------~--~----~------------~-------~--~----~
You
2006 Jan 16
16
acts_as_authenticated current_user in a model?
What do I need to do to be able to use an acts_as_authenticated
current_user in a model?
Is there some sort of include or require I can do some where that would
allow this?
**********************************************************
Here is what I am trying to do:
**********************************************************
class Setting < ActiveRecord::Base
before_create :created_by_user #
2017 Jan 19
2
SELinux upgrade
I have experienced this myself. It is very upsetting.
(Sent from iPhone, so please accept my apologies in advance for any spelling or grammatical errors.)
> On Jan 19, 2017, at 2:57 AM, Fabian Arrotin <arrfab at centos.org> wrote:
>
> log
2008 Dec 11
2
serialize array finder
Hello,
Not sure if this is even possible/practical but I''d like to serialize an
array to a string field like this and then be able to match against it.
User.find(:all, :conditions => ["interests in
(?)",current_user.interests)
Am I better of not denormalizing? How would this be done with ordinary
A/R relationships because I''m not looking for an exact match,
2008 Mar 04
4
Named collection forward fetching
Hello,
I''m getting an "NoMethodError" traversing a named collection. Let me
explain
I have a named collection called best_friend in a class called user
def self.best_friend
find :all, :conditions => "designation = ''Best Friend''"
end
and if i do current_user.best_friend everything works great, I can pull
up the user''s name as
2005 Oct 14
5
[PATCH] Fix NAT for domU checksum offload
Below is a fix for the current problem of checksum offload not working
in a NAT''ed network. The cause is the NAT/iptables code incorrectly
modifying the TCP/UDP checksum (for the checksum offload case). The
original code assumes a valid checksum, which is not the case for
checksum offload packets (which has a complimented, partial checksum for
the hardware to use). The fix is to
2008 Jan 03
1
help - updated from 1.2.5 to 1.2.6 and getting undefined method 'session=' for ActionController::base
i start the server but it exits right away,
I ran the rake to update and changed the version string in config.rb.
Any thoughts on this matter would be appreciated.
i imagine that it has something to do with the session, but i am not
able to figure it out.
my config/config.rb has the following
config.action_controller.session = {
:session_key => ''c3_rails_session'',
2010 Dec 21
4
Keeping Leading Zeros, Treating numbers as text
Hello,
I have a data set, with some numerical values, some non-numerical data, my
issue is that I need to preserve my ID numbers (numerics) with the leading
zeros, but when I import the data into R (it's in .csv format) using the
read.csv(" ") command, it turns all the ID numbers (Example: 00210) into
numbers, removing the leading zeros, so I end up with 210. I tried using the
2008 Jun 17
3
Help with error - uninitialized constant AuthenticatedSystem::Base64
I am using restful_Authentication plugin combined with the built-in
http_basic authentication Rails 2.0.2
The following code in my controller seemed to work fine,
1. before_filter :authenticate
2.
3. def authenticate
4. case request.format
5. when Mime::XML, Mime::ATOM
6. if user = authenticate_with_http_basic { |name,
pass| User.authenticate(name,
2008 Jan 08
47
specs on private methods
How does a person test private methods?
Is there a way to declare them as private, but retain any tests that
were written during the initial development?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2009 Jan 05
3
Plugin not found: ["acts_as_list"]
I am trying to install acts_as_list in a rails 2.2.2 project but when I
try the following: ruby script/plugin install acts_as_list
I get: Plugin not found: ["acts_as_list"]
I had to download the acts_as_list plugin from the github because it
isn''t included in Rails 2.2.2.
The files are in my vendor/plugins/acts_as_list folder so I have:
lib/active_record/acts/list.rb
2009 Jul 25
3
Rails Authorization and Security question
Working through the Users and Authentication of Learning Rails book
(great book, code needs to be proof-read in a few cases, though), I
came across this:
There''s still one leftover that may be worth addressing, depending on
your security needs. The authorization? method has secured the data,
and the view no longer shows the user options they can''t really use,
but if a
2008 Jul 12
1
Re: Re stful_authentication, Internet Explorer, and unwanted http basic dialog
I''m glad I found your post Joshua - it saved me quite a bit of time!
To get this to work for me however (IE6), I had to ditch the ||= and do
straight assignment:
request.format = :html if request.env[''HTTP_USER_AGENT''] =~ /msie/i
Joshua Doss wrote:
>
>
> Alter access_denied to add this line (right below "def access_denied"):
>
>
2006 Dec 11
1
Index help on Polymorphic Associations
Hello,
I''m a newbie to aaf and rails and I hope anyone can help me with this.
I have the following Models:
class Project < ActiveRecord::Base
acts_as_authorizable
acts_as_audited :except => [:created_by, :updated_by ],
:user_class_name => ''AuthenticatedSystem'', :user_method =>
''current_user''
acts_as_ferret :fields => {:name =>
2009 Nov 24
3
Help: Beanplots calculating wrong average
Hi there,
I have a set of data that looks like this:
As1988<-c(1254.0, 22.0, 4.2, 1081.0, 35.0, 6.0, 1772.0, 192.0, 7.6)
The mean of this (as calculated by R) is: 485.9778
The median of this (as calculated by R) is: 35
If I then make a beanplot(As1988), I find that the beanline (average) is now
77.68561 while the beanline (median) is 35.39739 (using the locator function
to check the
2007 Jul 03
1
Session Border Controller time...
Come on you carriers on the list... Give up the dibs what are you using
and why?
About to sledgehammer these SELECT * FROM GARBAGE WHERE SBC = 'nCite'
Don't bother shooting me off Newport Networks stuff... Too pricey
--
====================================================
J. Oquendo
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1383A743
echo infiltrated.net|sed
2007 Jun 09
11
authentication, controller specs. I think I''m missing something simple ....
Hi all,
I feel like I''m missing something really easy and I''m just not seeing
it.
I''m using the restful_authentication plugin and have a User model. Uesr
has_many :things and Thing belongs_to :user.
That''s it.
I did a "script/generate rspec_scaffold thing" to generate all the
necessary bits. The "rake db:migrate" to create the db.
At
2017 Nov 02
1
EXTERNAL: modestly priced laptop for C7
On 11/02/2017 01:42 PM, Fred Smith wrote:
> I'm looking to replace my (old, creaky) netbook (Acer Aspire One D255e,
> a screaming dual core 1.6 GHz Atom, and a whole 2 gigs of RAM) with
> something faster but not too large. Sometimes (usually) the netbook is
> painfully slow.
>
> Something like a hi-res 14 (or 15) inch screen (full HD), minimum of 4 gigs
> RAM, HD of a