search for: create_s

Displaying 15 results from an estimated 15 matches for "create_s".

Did you mean: creates
2006 Jun 23
1
instantiate record in single table inheritance
Hi, is there a way to instantiate a _concrete_ subtype from within an ActiveRecord collection? Example: class Link < ActiveRecord::Base end class InternalLink < Link end class ExternalLink < Link end internal_link = my_navigation.links.create_[xxxxxxx] external_link = my_navigation.links.create_[xxxxxxxx] the [xxx] is what I am missing... I could do this external_link =
2009 Sep 13
1
belongs_to + create_* = rails vs. console behavior difference = confused Pepe
Hi, I have been battling something for a good hour and a half and finally realized how to ''solve'' the issue but I am very confused as of why I should do what I just did. I have 2 classes: class User has_many :audits ... end class Audit belongs_to :user ... end The way things need to work is to first create an audit and after the audit is created a user that has
2007 Nov 08
3
Downloading a file into a directory that does not exist
Hello again, all: When downloading a file from the puppetmaster''s fileserver, like so: ==========SNIP========== define install_file ($mode = 0644, $owner = ''root'', $group = ''root'') { file { "${name}": source => [ "puppet://${puppetserver}/dist/files/${name}_${operatingsystem}",
2008 Jan 11
5
Missing methods
We have a custom implementation of the Mother Object idea. It''s inside of a module, basically like this: module Factory %w(account friendship person invitation message asset email_address birth).each do |klass| eval <<-EOF def self.create_#{klass}(attributes = {}) default_attributes = valid_#{klass}_attributes #{klass.camelize}.create!
2006 Mar 23
2
Way to iterate over each associtaion
Is there a way with ActiveRecord to get ahold of a collection containing each association? I want to write a rake task that will dump a model and all its related models to yaml. Thanks, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060323/abdf4305/attachment.html
2007 Mar 20
0
ActionMailer template issues?
I''m using ActionMailer and it''s working fine when actually sending mail. I have a TestEmailController whose job it is to render sample versions of each email we send and show them in a browser for review by QA & our creative teams. Currently, I''m using the create_* method in ActionMailer, and then trying render :text => email.part[1]. When I do this, the
2006 Jan 02
2
Dynamic form tags
Hi all, I''m happily using "HowToReuseEditViewsForNewViews" found at: http://wiki.rubyonrails.com/rails/pages/HowToReuseEditViewsForNewViews There''s this comment there saying you only need the tag "<%= auto_form %>" when using the code below. Can somebody tell me if that will work when extending it with model_name (some how)? I have several new_*
2004 Oct 25
1
Rails 0.8: Just shy of 100 additions, changes, tweaks, and fixes!
...e.org You never actually call the instance methods like signed_up directly. Instead, you call class methods like deliver_* and create_* that are automatically created for each instance method. So if the signed_up method sat on ApplicationMailer, it would look like this: ApplicationMailer.create_signed_up("david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org") # => tmail object for testing ApplicationMailer.deliver_signed_up("david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org") # sends the email ApplicationMailer.new.signed_up("david-OiTZALl8rpK0mm7Ywyx6yg@public.g...
2014 Sep 25
2
[PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue
Workqueues have clean and rich API for all basic operations. The code is usually easier and better readable. It can be easily tuned for the given purpose. In many cases, it allows to avoid an extra kernel thread. It helps to stop the growing number of them. Also there will be less thread-specific hacks all over the kernel code. It forces making the task selfcontained. There is no longer an
2014 Sep 25
2
[PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue
Workqueues have clean and rich API for all basic operations. The code is usually easier and better readable. It can be easily tuned for the given purpose. In many cases, it allows to avoid an extra kernel thread. It helps to stop the growing number of them. Also there will be less thread-specific hacks all over the kernel code. It forces making the task selfcontained. There is no longer an
2006 Aug 12
7
Documentation for wxRuby
I have written an addon file for rake that turns the wxWidgets documentation into something much more Ruby like. The code has not been cleaned up or re-factored and needs some extra features added but it does quite a bit already. I have uploaded the generated documentation to my web site so people can view it. http://hailstonesoftware.com/_files/Ruby/wxruby/html/wx_contents.html. I also have a
2012 May 15
5
setting up the SQLite database
...me #from an old snippet 1.2 OR like this (postgres) example [Magnus]: def List.create List::Models::Base.establish_connection( :adapter => "postgresql", :username => "root", :password => "toor, :database => "list" ) List::Models.create_schema end 1.3 in a config/database.yml file [Magnus] (probably not worth it for SQLite): --- adapter: postgresql username: root password: toor database: mycampingdb And then do: require ''yaml'' def AppName.create AppName ::Models ::Base.establish_connection(YAML.load(Fil...
2008 Nov 30
11
rake aborted! undefined method `each' for #<Mysql:
I''m struggling with several problems getting my first time ruby on rails environment running. I''m now stuck on this problem too. rake db:migrate generates the following error. This one is on a vista machine. Anyone seen this before. Any thoughts or advice? Reading about Ruby on Rails has really got me excited to give it a try. But in practice getting to the point that I can
2008 Nov 21
0
Wine release 1.1.9
...ling of 'superseded'. Assorted spelling fixes. msxml3: Dynamically load libxslt.so and only call xsltInit() if present. ntdll/tests: Fix typos in test_NtQueryValueKey(). ntdll/tests: Test how NT(Set, Query)ValueKey() handle non-terminated strings. kernel32: Fix create_scsi_entry() so it puts properly '\0'-terminated strings in the registry. kernel32: Simplify and optimize create_(system,env)_registry_keys(). msxml3: Fix compilation on systems that don't have xsltInit(). regedit: Fix a buffer allocation in export_registry_key()....
2011 Oct 10
0
Wine release 1.3.30
The Wine development release 1.3.30 is now available. What's new in this release (see below for details): - DirectSound reimplemented on top of MMDevAPI. - Support for StretchBlt in the DIB engine. - User interface improvements in HTML help. - Some MSXML fixes. - Performance improvements in cmd. - Various bug fixes. The source is available from the following locations: