Displaying 20 results from an estimated 700 matches similar to: "Userstamp Plugin"
2006 Apr 01
5
Triple relationship
Hi list,
I need to represent a relationship between three tables:
Tags (id, name)
Users (id, name, email, ... )
Documents (id, title, ... )
I created a forth table called Assignments(id, tag-id, user-id,
document-id, date).
I have couple of questions:
Should I use belongs-to and has-many to capture this? If so, How can I
do that?
should I have the id as the primary key in Assignment table or
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 #
2006 Sep 09
13
best way to add "created_by" entries to all tables???
Hi,
I want to automate somewhat the addition of created_by/updated_by fields
on my models (i.e. to include username). What''s the best/recommended
way to do this? Would it be to:
a) Find out how to extend the ActiveRecord::Base itself (I haven''t
extended a class before yet)
b) Use a plugin type approach where you have to add a tag manually to
each model file which then
2006 Feb 14
10
acts_as_versioned and getting authors
Hey guys and gals,
I have the following object that has acts_as_versioned:
class Note < ActiveRecord::Base
acts_as_versioned
belongs_to :user
end
The schema for my notes table is as follows:
create_table :notes, :force => true do |t|
t.column :id, :integer
t.column :noteshare_id, :integer
t.column :user_id, :integer
t.column :title, :string
2006 Apr 17
15
Version 1.1.2 CHM Documentation File
I finally got around to compiling the Rails 1.1.2 Documentation into a
CHM file this morning.
You can download the file directly from here:
http://delynnberry.com/files/rails-documentation-1-1-2.chm.
Let me know if you encounter any problems with the file.
--
DeLynn Berry
delynn@gmail.com
http://delynnberry.com
2006 Nov 24
14
CHM Documentation for Rails 1.2.0 - RC1
Since the first release candidate of Rails 1.2.0 was announced
yesterday, I decided to update my CHM documentation file for this
release. You can find the updated file via my CHM Documentation
Project Page [1], or you can download the file directly from here:
http://delynnberry.com/assets/2006/11/24/rails-documentation-1-2-0-pre-release.chm.
[1] -
2006 Oct 16
6
Rails CHM Documentation - 1.1.6
Just a quick email to let those interested know that I''ve posted an
updated version of my CHM document that now has all the documentation
from the 1.1.6 release of Rails. You can read more about it here:
http://delynnberry.com/2006/10/16/rails-chm-documentation-version-1-1-6
I''m also planning on creating a pre-release version based on what is
currently available in Rails trunk.
2006 Feb 07
13
CHM Documentation for Rails Version 1.0
Just wanted to let everyone know that I just posted an updated CHM file that
contains documentation for Rails Version 1.0. You can read all about
it here<http://www.delynnberry.com/articles/2006/02/07/rails-chm-documentation-version-1-0>.
I plan to continue updating the CHM file as newer versions of Rails are
announced, but I also want to finish an article that includes a rake file
that will
2006 Mar 07
4
Controllers More Than One Sub-Directory Deep?
Does anyone know how to make Rails aware of controllers that might
exist in directories that exist deeper than one level under the
app/controllers directory? I initially figured just adding additional
scope information might do the trik (i.e. Tabs::Admin::OneController
or Admin::Tabs::OneController), but that does not seem to work.
I''m guessing that I can just manually add these
2006 Feb 19
8
select, first option empty value?
using the below:
<%= select(''project'', ''project_type_id'', @project_types.collect {|x|
[x.name,x.id]}, {:include_blank => true}) %>
but i''d like that first option to have something like "select project
type" with an empty value?
2006 Jul 18
1
usermonitor / user stamping active record
Quick question about userstamping records in a similar way to
timestamping. There is an example of how this might work at:
http://wiki.rubyonrails.org/rails/pages/Howto+Add+created_by+and+updated_by/versions/7
This seems to work fine on my development system. However, I am not
sure how the User.current_user method, which is required, can guarantee
to return the correct user since this is a
2006 Feb 26
3
Rails Naming Conventions
DB field names:
If I have a table that references 2 or more separate users from my users
table, is there a recommended naming convention for this situation? In
my case, I have 3 users associated with a record in my projects table:
requester_user_id
created_by
updated_by
I could name one of them "user_id", and then projects.user would work I
guess, but wouldn''t work
2009 Oct 20
0
Userstamp plugin doesn't load in "test" environment - y not?
I''m working on an app. with the userstamp plugin in it (from 2 - 3 years
back).
In the init.rb file, there''s this:
ActiveRecord::Base.send(:include, ActiveRecord::Userstamp) unless
RAILS_ENV == ''test''
This causes certain tests to fail since created_by is a required
attribute.
Does anyone know the idea behind Userstamp not loading in the test
environment.
2006 Jun 02
4
Web app developed in WInXP want to run on Linux
Hi All,
I have developed a web application using RoR on Window-XP. Now my server
is on linux and want to get this running on linux machine. I tried
starting the server but it failed to boot in boot.rb at this line:
unless RUBY_PLATFORM =~ /mswin32/
require ''pathname''
root_path = Pathname.new(root_path).cleanpath(true).to_s
end
so I changed(even though the file says
2006 Apr 24
4
creating a select box
Hi
trying to create a select box in _form.rhtml.
I have a table called organisations that contains fileds, 2 being ''id''
and ''name''
these are the fields I need to bring over to the clients _form.rhtml.
whats the best way of going about that??
2 ways i have seen suggested that I cant get to work
-@organisations = Organisation.find_all placed this in def new
2006 Dec 06
2
validates_uniqueness_of where scope euqals created_by "magic" field
I have the following ActiveRecord objects:
class Recipe < ActiveRecord::Base
has_many :ratings, :dependent => true
. . .
end
class Rating < ActiveRecord::Base
validates_uniqueness_of :created_by, :scope => :recipe_id
belongs_to :recipe, :counter_cache => true
. . .
end
The created_by field on Rating is implemented as a "magic" field
similar to this:
2006 Apr 03
3
Retrieving a record using created_by
Hello,
Thank you all in advance for your help with this.
Environment:
Windows XP Pro (Development only)
Ruby 1.84
Rails 1.1.0
SaltedHashLoginGenerator
Plugins: file_column, userstamp
I have a user table per the salted_hash_login generator. I have an
orders table that has a column named created_by that is updated by the
userstamp plugin. I am trying to retrieve all of the orders for a single
2006 Apr 25
3
select boxe
yop,
http://rubyonrails.org/api/classes/ActionView/Helpers/FormHelper.html
ici j''ai vu qu''on pouvait g?n?rer des ?l?ment d''un formulaire gr?ce des
m?thodes. Apres quelque petite recherches j''ai trouv? comment g?n?rer un
select
<%= select(''category'', ''category.id'', Category.find_all.collect {|category|
category.nom})
2006 Jan 31
2
Problem generating CHM Rails doc
Hi,
I have problem generating chm file for the rails doc.
I''ve commaned the rdoc to generate the chm by:
rdoc -f chm -o chm_folder action* rails-*
It gave me the following error:
vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb:3:15:
Expected class name or ''<<''. G
ot RubyToken::TkLT: "<"
By adding
2011 Nov 18
1
What does :count actually mean in assert_select?
Hi guys,
I tried reading up the RSPEC Book (Dec 2010) and googled a bit but I
could not find anything.
I''m using Rspec2.
Example:
spec/factories/categories.rb
======================
FactoryGirl.define do
factory :category_intakes, :class => ''category'' do
name ''intakes and filters''
description ''airfilters and