Displaying 8 results from an estimated 8 matches for "meshac".
2006 Mar 04
5
SQlite3 hoopup issues on mac os x
friends of the int-arweb.
what does this mean:
(in bold) ActiveRecord::StatementInvalid in Contact#create
SQLite3::SQLException: SQL logic error or missing database: INSERT
INTO contacts
Context:
this happened after I had finished setting up RoR as per the tutorial
at http://maczealots.com/tutorials/ruby-on-rails/
the database, is like, there. is there a nice ruby command like deal
to
2006 Apr 04
3
small question about the relevance of the "database schema has changed"
I have developed 3 small applications using rails (nothing production
worthy, just some small stuff "prototype" style). And I often end up
changing my database scheme in the middle of development. I also use
"script/generate scaffold" (this is somehow relevant to my question).
Whenever I change my database schema I end up having to regenerate the
scaffold. In the past this
2006 Jul 09
8
Can the has_many create() method return an ID?
Hi all,
I have a has_many relationship, Cookbook :has_many Recipes
If I want to create a new recipe in my cookbook I do:
cookbook.recipes.create(data)
It would be nice if I could then easily get the id of the new recipe,
but the create() method doesn''t seem to return anything. Any ideas how?
Thanks in advance!
Cameron
--
Posted via http://www.ruby-forum.com/.
2006 May 26
3
Breakdowns in has_many abstraction
I discovered an interesting aspect of has_many behavior that I''m
struggling to work around. I''m not sure if I''m doing something wrong,
or if it''s a legitimate bug, or if it''s an inherent part of Rails that
I just have to learn to deal with.
It boils down to these two problems:
- changes in collection objects (i.e. models that belong_to a
container
2006 Jul 11
1
instance vars in layouts
Hello List,
The layouts contain the instance var @content_for_layout; is it possible
that they may also contain the instance vars from a controller similar to
the way a controller''s views do?
cheers,
- trav
--
p [151,40,154,157,166,145,40,162,165,142,171].collect { |ii| eval
''"\\''+ii.to_s+''"'' }.join
-------------- next part --------------
2006 Apr 11
0
a user model in all controllers in 6 lines of code
Well it took a bit of research, and making a fool out of myself; but I
found a way to get a user model from the session and have it
accessible in every controller and view in 6 lines of code.
In the ApplicationController write
model :user
before_filter :set_user
private
def set_user
@user = session[:user] ||= User.find_by_username(''nobody'')
end
I have redeemed myself
2006 Feb 06
2
how do i reload a module in the vendor directory?
This seems like a fairly straight forward question. I have code in the
vendor directory.
Any modifications that I make to the code are not respected. My rails app
is in development mode so I would expect any require ''code'' to be
re-parsed. But this is not occuring... How so? I have a test to post if I
need to, but I get the feeling that I am just missing something simple. I
2006 Jul 12
1
odd habtm behavior? or is it me?
Hello List,
I''m a bit spent on this problem, and my code might be whack. I seem to be
encountering a problem where the primary key on a join table is not being
resolved correctly. I will elaborate after some code bits. I am creating
the join table using migrations, and relevant model code is this:
class Post < ActiveRecord::Base
has_and_belongs_to_many :records