similar to: RJS template help

Displaying 20 results from an estimated 700 matches similar to: "RJS template help"

2006 Aug 02
3
using migration--newbie
Hi all, (I''m new with RoR) I''m using a migratio to import data into a database but nothing is being happens. I''m importing strings from a parsed file. this is what I have: controller: class UploadController < ApplicationController def create table = { } params[:localized_string][:data].each_line do |line| if line =~ /^\s* " (.*?) "
2006 Jul 23
3
Newbie: Display hierarchical Records in a view
Hi, I have two models: category and subcategory. (one to many relationship), and a controller ''home'' I''d like to display all the categories and their sub categories in the view: home\index.rhtml. I have a method in the ''home'' controller'' like this: def list_categories @categories = Category.find(:all) end This list all the categories
2006 Jul 13
2
Simple dropdown menu
Hi, I''m quite new to this language and I''m having trouble finding out simple things like a dropdown menu in rhtml. I know I have to use <% select_tag %> but I''ve read lots of different ways to put in the options so I''m a bit confused. Options are hard-coded for the menu I''m trying to create so no database is involved! Thanks v much! Bex --
2006 Jul 19
1
Passing objects to drb, does it keep the existing db connection?
I have a simple question. Let''s say I do this in one of my models: after_save drb_conn.some_method(self) end When that object gets over to the background process is it the exact same as?.... Model.find some_id #in the background process As far as my background process is concerned passing the object is not any different than passing the id and using the find method? Because
2006 Aug 24
1
ActionMailer doesn''t work in backgroundrb
I am pretty confident that mailers do not work in backgroundrb. Can anyone confirm this? Because when I try to do Notifier.deliver_some_method I get an error saying it cant find the templates for my email. The funny thing is that when I run script/ runner Notifier.deliver_some_method it works just fine. Any ideas? Thank You, Ben Johnson E: bjohnson at contuitive.com O: 800-341-6826 M:
2006 Jul 07
2
Problems installing, please help
I am in my rails project directory and I ran the following command: script/plugin install svn://rubyforge.org//var/svn/backgroundrb and I get this: sh: svn: command not found Any idea how I can install backgroundrb or what the problem is? Any help is greatly appreciated. Thank You, Ben Johnson E: bjohnson at contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part
2006 Jul 09
1
Drop down menu in rails?
Does rails have a nifty utility for creating javascript drop down menus? Thanks for the help. Thank You, Ben Johnson E: bjohnson@contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060709/869e8e30/attachment-0001.html
2006 Jul 17
2
Getting the original url from a controller action method
Is there a simple way to get the original url which spawned a controller action, including any query parameters? Thanks in advance, Don Mc -- Posted via http://www.ruby-forum.com/.
2006 Aug 18
1
Ezra....allow_concurrency = false?
In a previous email you wrote this: Glad you''re getting some use out of the plugin ;) ActiveRecord does have some issues with threading and concurrency that can sometimes cause that error you are seeing. Open up your script/backgroundrb/ start file and comment out the following line: ActiveRecord::Base.allow_concurrency = true Make sure you do that up in your main app script folder
2006 Aug 01
4
Creating workers from workers?
Since MiddleMan is an uninitialized constant in a worker how do you create new workers inside a worker? Thank You, Ben Johnson E: bjohnson at contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060731/75a77fa6/attachment-0001.html
2006 Jul 20
9
Including children''s children?
a has many b''s b has many c''s results = A.find params[:id], :include => :b How do you also make sure the b''s include the c''s? Thanks for your help. Thank You, Ben Johnson E: bjohnson@contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jul 12
0
Initialize limited?
Can I not do things with the models in my initialize method? I have this: def initialize(args) super args i = 0 Event.find_all do |event| @lock = i i += 1 end end i is null and there are events in the database. Any ideas how I can use my models in the initialize method? Thank You, Ben Johnson E: bjohnson at contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part
2006 Jul 07
0
gem update error?
I am trying to run: gem update rails and I get this error: Attempting remote update of rails ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find rails (> 0) in the repository It does that for ANY gem I try to update. Any ideas? Thanks for your help. Thank You, Ben Johnson E: bjohnson@contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part
2006 Aug 02
1
Ordering the many in a many to one relationship
I have a many-to-one relationship between a model named Category(one) and a model named Brands (one). How can I get ActiveRecord to order the brands by the "name" attribute? This seems like a simple question and I can think of long ways around it but there has go to be a way to do this by accessing @category.brands . Can anyone help? I tried the code below in the controller but it
2006 Jul 09
1
REST Interface
Is the REST Controller (for calling APIs through the REST interface) already built-in ?? Or, I have to generate one -- generate controller rest ?? MSN id: ICEMANyears@netscape.net -- Posted via http://www.ruby-forum.com/.
2006 Jul 12
1
Is it possible to reload all ActiveRecord objects
Hi all, I wander if it is possible to force reload of all ActiveRecord object''s of some class that are already loaded, something like Book.reload_all? I know that I am able to reload specific objects with reload method but I would like to reload all that are currently in memory. thanks in advance, Bojan -- Bojan Mihelac Informatika Mihelac, Bojan Mihelac s.p. |
2006 Jul 14
2
db:migrate question
Hi, In my environment.rb, I have set: config.active_record.schema_format = :ruby Whenever I do a rake db:migrate, both db/development_structure.sql and db/schema.rb get generated. This shouldn''t happen should it? I thought I should only get db/schema.rb? Thanks, Jordan
2006 Aug 31
2
$_SERVER for rails?
Is there something similar for rails that is like $_SERVER in PHP? Something that gives you the hostname, etc. I tried using just host in my controller, because the documentation says there is a host method, and got an undefined method error. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to
2006 Jul 06
17
Linux distros
Is there any particular distro that seems to be most used among RoR developers on Linux? Any that might provide better support somehow for development of RoR apps? -- Posted via http://www.ruby-forum.com/.
2006 Jul 17
2
after_save deletes is an exception is raised?
Does after_save in a model delete if an exception is raised in there? I simply did def after_save raise ''hmmm'' end and it raised the exception but there was nothing in the database. I removed that entire method and its in the database. Is this correct? Thank You, Ben Johnson E: bjohnson@contuitive.com -------------- next part -------------- An HTML attachment was