Displaying 20 results from an estimated 20000 matches similar to: "Dr Nic’s Magic Models"
2006 Aug 08
4
Nic’s Magic Models, how about Magic Schema
I side with David when it comes to databases. They suck! Just my own
opinion.
So what about the people who don''t want to define validations and stuff
in the database, but still want to be DRY.
I really hate how the schema is separate from my models. I kind of like
how Django defines the table attributes in the model. I was think about
trying something like that in Rails.
You could
2006 Jul 28
7
[VAPOUR] Dr Nic''s Magic Models
Welcome! Welcome! Welcome! Ladies and Gentlemen, soon you shall be
thrilled and dazzled by wonders of magical mystery.
Soon, very soon, Dr Nic''s Magic Models will be unveiled to all. Children
will giggle; Rubists will nod acknowledgingly; Railers will applaud
loudly.
No entry fee. 2 drink minimum.
Watch out for the Invisible Model Classes. Got a legacy database of 50
tables? You
2006 Aug 12
5
Administrative Console Screencast
The first administrative console screencast is now available at:
http://screencasts.visualjquery.com/demo1/
I''ve posted a bunch about the Admin Console, but it''s essentially an
automated scaffold that works as an engine.
The screencast is a quick overview of the minor things you''ll need to do
in models, environment.rb, and others, as well as ::drumroll:: a demo of
2006 Aug 08
3
"undo" a model
In the event that I really don''t want a certain model, can I delete it?
Is there a tool that I can use besides ''rm'' to ensure I hit everything
related to the model?
Right now my only guess is to just remove all files that match a
filemask and hope for the best.
2007 Apr 19
4
Save sessions on file system instead of database table?
Hi
Is there a way to save session data on the file system (like in Rails)
instead of a database table?
The reason I''m asking is, that I''m writing a Camping application without
using ActiveRecord (mostly for learning purposes) and I don''t want to
use ActiveRecord just for sessions.
Thanks,
Thomas
-------------- next part --------------
A non-text attachment was
2007 May 27
1
annotate_models plugin to annotate RSpec specs and fixture
I have found useful to have the table information associated to models
disp?ayed in the models and fixtures files of my rails applications.
If you want to add this information to the spec_fixtures and specs add
the following patch to your plugin.
Index: vendor/plugins/annotate_models/lib/annotate_models.rb
===================================================================
---
2006 Aug 02
4
RadRails and EdgeRails
Anyone know how to setup EdgeRails with RadRails ?
Stuart
2006 Aug 07
1
:load_rails
if CONFIG[''load_rails'']
ActiveRecord::Base.allow_concurrency = true
ActiveRecord::Base.establish_connection(YAML.load(ERB.new(IO.read
("#{RAILS_ROOT}/#{CONFIG[''database_yml'']}")).result)[CONFIG[''environment'']])
end
if i read the code right, this option doesnt really load rails. wouldnt it
be better (for those who rely on the
2006 Aug 08
8
executing external code
I''m trying to run some non-ruby code in my rails app and i''m not sure
how to do this. The code i have would take a really long time to port
to ruby and so i''d rather run it as is (its php). What i would like
to have happen is that the code can be invoked as an ajax call. And
just return some data in JSON.
I keep running into a routing failure by actioncontroller and
2006 Aug 07
2
Call for examples
He folks-
First off thanks to everyone for helping to make this plugin work
better for all of us. Its nice to have a bunch of people testing and
adding features. I would like to ask for people to post some examples
workers. I would really like to get a few more workers to distribute
with the plugin. Especially ones that a lot of people seem to need
like Email workers. So if you are
2006 Aug 05
5
RESTful Nesting issue
I?m having a strange issue with nested routes though, and was wondering
if anyone could shed some light on this?
If I have:
map.resources :users do |users|
users.resources :items
end
When I try to call
<%= link_to_remote ''Delete'', :url => item_url(@item), :with =>
"''_method=delete''", :confirm => ''Are you sure?''
2011 Jul 28
2
RSpec, shoulda-matchers and Rails model attributes validations
I was trying out RSpec framework in a project and got stopped doing the unit
test of a model. In particular, doing the test for the associations and the
ActiveRecord validations.
I started writing the validations but my tests didn''t look DRY at all.
Before refactoring the tests checked out and look for other people
solutions.
I found out shoulda-matchers and Shoulda (which if I
2006 Aug 14
1
Testing CRUD/Rest Controllers
I have a few simple controllers doing plain, simple crud in a standard way.
now it''s not very DRY to write a funtcional test for each controller, since
they are all doing the same (apart from a few variable names, but that could
be easily inflected or so).
is there a way to do this?
e.g. does inheritance work with tests, so i define a base test first,
inherit my other tests and add a few
2006 Aug 08
1
Problem installing the plugin...
Hi,
I am running ruby 1.8.4 rails 1.1 on Mac OSx and I am getting the
following error installing the plugin. Any ideas ? ( BTW This is a brand new
rails app )
Thanks !!
ruby script/plugin install svn://rubyforge.org/var/svn/backgroundrb --force
subversion/libsvn_wc/lock.c:630: (apr_err=155007)
svn: ''/Users/fgaliana/work/samples/fred/vendor/plugins'' is not a working
copy
2007 Jan 20
1
Camping on Media Temple?
I''m getting into camping in a big way--I love that you can put
together full-fledged apps with so little code and overhead.
Does anyone know of any documentation about getting Camping apps
running on Media Temple''s GridServer? Of course I''ve found the
Camping server page[1], but I can''t work out how to associate running
camping apps with a (sub)domain
2006 Jul 24
9
Mongrel: auto-reload plugins?
When developing applications, Webrick will automatically reload
controllers, models, etc. if the source changes. For obvious reasons, it
doesn''t do this for plugins, which makes it a pain to develop said plugins.
I was hoping Mongrel might have some facility to say "watch this directory
too and reload any changes". Obviously, re-init''ing all plugins would be
2006 Aug 10
0
[BTS] Dr Nic''s Magic Models - Class creation
For anyone interesting in some meta-programming ideas, I''ve written up a
short explanation about the Class Creation feature of Dr Nic''s Magic
Models.
I know most forum posts start with "How do I..." but thought it might be
interesting reading for the ppl who answer the forum posts that start
with "How do I..." :)
2007 May 04
22
CampingConf?
Campers --
In a few weeks there will be a bunch of people in Portland, OR, for a
conference. A long time ago some campers mentioned that might be a
good time for us to get together and hold a mini CampingConf for a few
hours. Is anyone interested? Does anyone want to organize it?
I''m thinking Wednesday night, May 16.
We could possibly get a spot at FreeGeek (not likely since they are
2006 Aug 23
5
Singleton-like Worker
Hello there,
I need a Worker Class to be Singleton-like, that means there must be at
maximum one Instance at a time. When a new Request is made to create another
worker of this type, it should return and wait for the other instance to be
destroyed.
what i need to do: i have a worker who needs to do sth with java and
openoffice, and it seems when i have more tha one worker simultaneously,
2011 Nov 02
2
Specify and validate requirements on an ActiveRecord association
Looking for some guidance/support on what feels like might not be an
uncommon use-case.
`User.has_many accounts`
`User.has_many payment_methods`
`Account.belongs_to :user`
`Account.belongs_to :payment_method`
`PaymentMethod.has_many :accounts`
There are lots of `Accounts`. When I (a `User`) want to assign
accounts to a `PaymentMethod`, I really don''t want to scope against
all of them,