Displaying 20 results from an estimated 40000 matches similar to: "Userstamp plugin doesn't load in "test" environment - y not?"
2006 Jan 20
11
Userstamp Plugin
I''m pleased to announce a new plugin for Rails: Userstamp. You can read my
blog post at http://www.delynnberry.com/articles/2006/01/20/userstamp-plugin
and/or read all about it at the perminant page
http://www.delynnberry.com/pages/userstamp. Any comments or suggestions for
improvement are much appreciated.
--
DeLynn Berry
delynn@gmail.com
http://www.delynnberry.com
A dump of the Readme
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 May 25
2
Capistrano only runs migration against production env?
All,
Just read in the Capistrano manual about the Capistrano "migrate" task.
There it says that:
"By default, all this task does is change to the directory of your
current release (as indicated by the current symlink), and run rake
RAILS_ENV=production migrate. You can specify that it should run against
the latest release (regardless of what the current release is) by
setting
2006 Aug 08
6
rake migrate the first time - uses more than schema_info?
All,
I have two migration files, file 1 and file 2.
For reasons that I don''t want to go into unless I must, I want to only
run file 2 on my production database (file 1 contains a bunch of table
creation stuff for already existing tables).
I figured if I created a schema_info table and set the version in it to
1, then I could just run rake db:migrate RAILS_ENV=production and just
2006 Apr 12
0
class attributes and thread safety
Are class attributes thread safe? For instance, the userstamp plugin
creates a User.current_user attribute and then it aliases the
ActiveRecard create and update methods to write created_by and
updated_by attributes using the value of User.current_user. For some
reason I can imagine a case where multiple users are logged in at the
same time and saving objects, and the value of
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 Apr 13
4
Apache/fastcgi setup can''t find custom config/*.yml file!
All,
Apache 2/FastCGI on Linux
My fastcgi config. file is set up to run the "test" RAILS_ENV.
When I go to access a view associated with a particular controller, I
keep getting a ENOENT (file not found) error on a custom config. file
that I am attempting to load.
What I can''t figure out is why it can''t find the file.
Here''s the code that loads it in my
2006 Sep 09
2
why doesn't this work (setting attribute in "before_create")
Hi,
Can anyone spot why the below doesn''t work?
* I have a "created_by" column in my create table in the dB
* I have a "before_create" line, which definitely gets called
* I tried a few different ways to set the "created_by" attribute in the
model but it doesn''t seem to work, i.e. doesn''t appear in the database
2006 Aug 09
0
Deployment: Best way to switch between test and prod envs.
All,
Not looking for advice on the relative wisdom of my actions :).
I have a Rails app. running under Apache 2/fastcgi that I would like to
switch from using the test environment (database) to using the
production environment (database).
I can do this by hand by modifying my xx_mod_fastcgi.conf file and
setting RAILS_ENV to be the appropriate value in the command that
initializes my
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 Jul 03
4
text_field doesn''t call overridden ActiveRecord getters
All,
In a template, I have
<%= text_field :target_list, :DateReceived,
{ :title => ''uploaded_at'',
:class =>
''target_list_info'',
:disabled => ''true'' } %>
Here is the DateReceived method on my
2006 Jul 05
3
PLUGIN newbie: How do I use an installed plugin
All,
I''ve downloaded and installed a plugin into my vendor directory. How do
I then take advantage of it?
It has an init.rb file which has the appropriate require.
What do I need to do to make sure that the plugin code gets loaded?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
2007 Jan 31
1
Just copied my app to another puter, and now...
it doesn''t run : (
no matter where i go in my controller, I am getting this error message:
The Browser View:
-----------------
Status: 500 Internal Server Error Content-Type: text/html
Application error
The Log:
------------------------
Processing Base#index (for 127.0.0.1 at 2007-01-31 06:01:31) [GET]
Session ID: 6a380e82bd3afb39dcb57ecfa143766d
Parameters:
2008 Sep 06
4
Is Rails 2.1 "protect_from_forgery" == csrf_killer plugin?
Just would like to verify:
Is protect_from_forgery (in Rails 2.1) == the csrf_killer plugin from
Rick Olson?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
2008 Mar 19
5
object_transactions plugin w/2.x disables AR session store
All,
Win XP
Rails 2.0.2
object_transactions plugin
(http://code.bitsweat.net/svn/object_transactions/)
transaction-simple gem 1.4 (required by object_transactions plugin)
AR SQL Server Adapter 1.0
SQL Server 2000
Using the object_transactions plugin with Rails 2.0.2 (and I assume
based on what I''m seeing that this goes for Rails 2.x) disables the
ability to save to an ActiveRecord based
2006 Jan 16
0
belongs_to with has_and_belongs_to_many
I''m having a problem with belongs_to and has_and_belongs_to_many.
Here''s a brief summary of the models involved:
class Member < ActiveRecord::Base
set_primary_key ''member_id''
has_and_belongs_to_many :projects, :join_table => ''projects__members''
has_many :projects, :foreign_key => ''created_by''
end
class
2006 May 10
2
What is wrong with this initialize method (code example)?
Here is my class:
class Document < ActiveRecord::Base
public
def initialize
puts "Called initialize..."
super.initialize
end
This generates the following error:
You have a nil object when you didn''t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occured while evaluating nil.initialize
WTF?
Wes
--
Posted via
2007 Aug 03
0
acts_as_paranoid and Association Extensions (has_one troubles)
Hi... Isn''t there a proper way or hack/workaround for the following?
* For the example with unfortunate disabilities.. look below,,,
Usage of has_* (associationmethods) do {def with_deleted
AccociatedModel#with_scope} {Paranoid''s#find_with_deleted}...
The has_one associations give me a nil object when invoking it with
Model.association_OBJECT.with_deleted. Has_many does like
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 Mar 26
2
File_Column plugin causes strange errors on windows
I installed the File_Column plugin and setup my relationships.
create_table "screenshots", :force => true do |t|
t.column "image", :string, :limit => 255, :null => false
t.column "description", :text
t.column "created_on", :datetime, :null => false
t.column "item_id", :integer, :null => false
t.column