Displaying 20 results from an estimated 20000 matches similar to: "Migration Rollbacks"
2006 Mar 21
2
Migration ~ Create
In one of my migration files I have the following:
===========
def self.up
User.create :name => ''John Kopanas'', :email =>
''john@kopanas.com'', :password => ''test''
end
===========
When I run it I get the following error:
===========
undefined method `create'' for
2006 Feb 14
8
Best Practices For back/cancel/return button
Are there any best practices for implementing a back/cancel/return
button... even when the page you want to return people too is 2 pages
back (when people submit form and then want to return)?
Thanks :-)
Your Friend,
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
2006 Feb 12
5
Passing Multiple Values In URL
Been a while since I programmed in Ruby and Rails and some of the
basic concepts I just loose so quickly. This one I can''t find any
examples of.
I want to pass two pieces of information in my URL. The :id plus I
want to pass my user_id. How do I pass it using the link_to?
Stupid question I know... but I can''t find the answer.
John Kopanas
http://www.kopanas.com
2006 Feb 17
2
acts_as_versioned and acts_as_taggable on same model?
I am trying to use acts_as_versioned and acts_as_taggable (plugin) on
the exact same model. Has anyone successfuly done this? I think
what I need to do is make model_versions acts_as_taggable instead of
my main model. Anyone have any other suggestions or any suggestions
how to do this?
Your Friend,
John Kopanas
http://www.kopanas.com
2006 Feb 17
3
Migration Errors?
Hi there,
I just bought the Rails Recipes and PDF preview of the book. So far
it''s excellent. I decided to try Chapter 8 of the book regarding
tagging.
I''ve done migrations before, and I feel comfortable with them, however
this error stumps me.
--------------------------------------------------
antrover:~/RubyProjects/rlog dhoefler$ ruby script/generate migration
2006 Feb 13
2
Overriding the error_messages_for method
If I wanted to override the error_messages_for method where within
the rails structure would I put it? Which file?
Thanks :-)
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
2006 Feb 15
2
Ruby 1.8.2 work with Edge Rails
Does ruby 1.8.2 of ruby work with edge rails or do I need to upgrade?
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
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 Mar 20
4
Capistrano: cap show_tasks working but rake show_tasks not?
Does it make sense that if I type cap show_tasks it works but when I
type rake show_tasks I get:
rake aborted!
Don''t know how to build task ''show_tasks''
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1287:in `[]''
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:300:in `[]''
2006 Feb 17
3
Accessing Yahoo!, Hotmail and Gmail address book?
Just wondering if any one has been able to come up with a solution to access Hotmail / Gmail / Yahoo address books via their ROR app?
Thanks for any tips/guidance you can provide.
Frank
---------------------------------
Brings words and photos together (easily) with
PhotoMail - it''s free and works with Yahoo! Mail.
-------------- next part --------------
An HTML
2006 Feb 14
1
Additional Model Validation
I created a method to do additional validation on my model. How can
I have that run whenever a model is being saved? (For now I don''t
want to extend AR.)
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info -
2006 Feb 14
6
Creating a String of Random Characters and Numbers
I want to create a random string of length n that is made up of
characters and integers. Is there a function in rails or ruby that
allows me to do this?
Thank you my friend :-).
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
2006 Feb 15
8
[OT] I user CocoaMySQL... anyone have any other preferences for MacOS X?
Looking for a quality alternative... if there is one :-).
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
2006 Mar 21
2
Capistrano: creating your own tasks
When I create a task within capistrano.rb I can call it using rake.
When I create a task and put it in deploy.rb I can call it. Neither
with or without the remote: namespace.
Anyone have any insight into why it does not work?
John Kopanas
2006 Feb 06
35
ROR Recipes Beta
Yesterday I got the beta version of ROR recipes book and the recipes are great. For those of you still thinking about it, I highly recommend the book.
The only thing I wish is that if there were some more recipes (greedy me), especially AJAX related and installing an application within your current application.
For instance, it will be great to see how one can implement the typo blog
2006 May 24
7
migrations and SQLite
I read in the instructions of Tracks that "upgrading via the rake
migrate command is quite a bit more tricky currently with SQLite and
SQLite3". Is there any gotcha regarding migrations and SQLite3?
-- fxn
2006 Mar 22
1
Capistrano - run command
Man, I can''t wait to get my hands on the capistrano book when it
comes out :-).
I have the following task in capistrano.rake (any task in deploy.rb
just does not want to be called)
=========
desc "Restarts the lighttpd server"
task :restart_server do
run "/users/home/jkopanas/bin/lighttpdctrl restart"
end
=========
When I run rake restart_server I get the
2006 Jun 09
1
Updating Fields In Migration for HABTM Relationship
Earlier I forgot to add updated_at and created_at columns for my
HABTM relationship so I created a migration to add them. In the
migration I also want to go back and set the value of the created_at
and updated_at columns for the previous rows. What is the best way
to do that?
Initially I thought I was being smart and decided to put an UPDATE
SQL query in a find_by_sql statement and
2006 Feb 16
5
Edge Rails, Ruby 1.8.2 and "uninitialized constant ''modelname''" error
I know it might seem like I am repeating myself but I can''t seem to
find the solution to my problem. I am trying to run edge rails using
"rake freeze_edge" and every time I do that my application stops to
work. I get an error on every page. I get a "uninitialized constant
modelname" error where modelname is the object being created for that
view
Has
2006 Mar 20
2
Capistrano, ftp user and svn user are different
What do you do when the ftp login username is different then the svn
username?
Every time I try to deploy it gets stuck right here:
[kopanas.com] executing command
** [out :: kopanas.com] Authentication realm: <http://kopanas.com:80>
kopanas.com
** [out :: kopanas.com] Password for ''jkopanas'':
** [out :: kopanas.com] subversion is asking for a password
** [out ::