Ruby on Rails »
Repeating fields on the same pageWed, 10 Mar 2010 22:13:24 UT
Does anyone know how I can repeat fields for a model (that would insert into different records) in a form? E.g. <% form_for @thing, do |f| %> <%= f.submit "DoIt" %> <%= f.text_field :value %> <%= f.text_field :value %> <% end %> So that somehow when the user pressed "DoIt", the first value would go
which files are rendered for an URL
Thu, 11 Mar 2010 00:05:01 UT
Hi, Is there a way I can figure out which files are run for a specific URL in a controller or a script? Given [link] files like: countries/ index.html.erb, countries/_country.html.erb, layouts/ application.html.erb and so on. Thank You
Call a controller method from a view
Thu, 11 Mar 2010 00:26:52 UT
Hi, I am trying to call a controller method from my view, but I get an error and I don't know how to correct it. What i am trying to do: I am in the edit form of the model Product, and products can have many ingredients. So on my edit form there is a text_field where you type the ingredient with a link "Add" which is supposed to add the typed
[ANN] Rubytest.vim 1.0.0 Released
Thu, 11 Mar 2010 05:04:16 UT
Hi All, Rubytest.vim is a vim ([link]) plugin, which helps you to run tests/specs/features in vim, in order to accelerate your red-green development circle. Within this realease, rubytest.vim supports almost all popular TDD/BDD frameworks in ruby community: testunit, rspec, shoulda, cucumber ...
sortable_element-onUpdate
Thu, 11 Mar 2010 05:19:35 UT
Hi All, Please check the below code and let me know whats the problem with the code. <%= sortable_element("parent_drag" ,:tag=>"div",:handle=>"legend" , reorder_collection();}") %> I'm trying to call a JS function, but its not working. Thanks & Regards, Priyadharsini T
Accessing subversion(svn) from rails application
Thu, 11 Mar 2010 06:34:23 UT
Hi All, i need to interact with svn from my rails application to maintain versioning of the files uploaded through the application. i also need to implements the featues available in svn through rails application. i want to know is this possible first and if so then how to do it. Please help me.
integrate google ads in rails application
Thu, 11 Mar 2010 06:52:36 UT
Hi friends I would like to integrate the google ads to my project please give some idea to how to integrate the ads Is there any plugin available for this
Recommend CMS systems on rails
Thu, 11 Mar 2010 06:11:02 UT
Hi All, We are service based company, now start working on ruby on rails technologies. We need a CMS system with Blog, Events, News, Web Pages, Video/Podcasts, Emails and possibilities to send sms to multiple people together/selected options. We need to develop this in within 5 days time frame with no experience
using image_tag as submit button inside form_for block
Thu, 11 Mar 2010 05:27:17 UT
Hi, I'm using standard Rails form builder form_for and haml. I'm trying to replace standard Rails submit button with an image. In addition Javascript runs on submit event. How can I replace the f.submit button by an image-based button? -------- remote_form_for(@message, :html => {:onsubmit => "jQuery(<code>)"})
Memcache configuration for sessions
Thu, 11 Mar 2010 08:38:58 UT
Hello, I've already got memcached running on desired machine by this command: memcached -d -m 256 -u nobody -p 11211 My configuration is placed in /config/enviroments/production .rb [link] But still memcache session store uses default configuration which is described in API Class: ActionController::Session::Mem CacheStore
jrails_auto_complete problem
Thu, 11 Mar 2010 08:55:57 UT
Hi All, I know this is not the right place to ask, but I am sure many people would have faced this weird jrails_auto_complete hovering problem. You can see my code here: [link] Everything works fine when auto-completed element is selected correctly. But selecting an element from the auto_complete list by mouse is tough (it's all
Problem indexing add Simple Table Inherance
Thu, 11 Mar 2010 09:50:11 UT
I have a simple table inherance, with an upper class GeneralElement. A class that inherits is Activity: class Activity < GeneralElement ... end The GeneralElement table is very big (about 2.000.000 rows!). Other classes that inherit from GeneralElement return queries very fast, but Activity.last is very slow. I have added indexes to id and type, but it
Determine if part of a hash key exists
Thu, 11 Mar 2010 11:13:52 UT
Hi, I have a hash something like {:schools_name => ''test", :schools_address => "test, etc....} What i need to know is does any of the keys contain the word "schools" in it. So hash.has_key? :schools_name will return true But how can i get it to return true if part of any key contains the word "schools"
Bypassing automatic STI generation
Thu, 11 Mar 2010 14:26:39 UT
Hi, Let's say I have the following: Product < AR Memberships < Product I know that the product with id 10 has its type column set to "Membership", but still I'd like to treat it as a regular product. So if I do: Product.find(10), Rails returns a Membership object. Is it possible to tell rails to not care about STI and to simply return
rendering simple html from view/controller
Thu, 11 Mar 2010 14:32:33 UT
I start apologies for the silly question..but: how do I show the content of a view in a controller by url I mean why, with the starting rails conf and I simple scaffold done, i can't do root/:controller/:action and see the action.html.erb content? it warns me writing "Couldn't find Product with ID=new2"
bad url in js script
Thu, 11 Mar 2010 14:45:59 UT
When running in development env, I don't have this problem, only in production... I have a view in which a js script display a FlowPlayer video player (+ plugins)... the flash files are located in the /public/dist folder, ant the script calls them like that : <script> $f("player", "/dist/flowplayer-3.1.5.swf", {
acts_as_tree test fails : duplicate entry # for key #
Thu, 11 Mar 2010 14:51:00 UT
Hi, I've set up a model as follows class EquipmentPrice < ActiveRecord::Base acts_as_tree :order => "id" ... end which has the following db migration class CreateEquipmentPrices < ActiveRecord::Migration def self.up create_table :equipment_prices do |t| t.integer :id t.string :manufacturer
trying to install postgres gem on fedora 12 ..
Thu, 11 Mar 2010 15:37:38 UT
I get these errors : gem install pg -- --with-pgsql-include-dir='/usr /include/pgsql' -- with-pgsql-lib-dir='/usr/lib/p gsql' Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb --with-pgsql-include-dir=/usr/ include/pgsql --
dom:loaded problems
Thu, 11 Mar 2010 15:40:57 UT
Hi everybody: I was trying use dom:loaded, but I read in the Api of prototype that this function load all HTML code except the images. My problem is that all my web is an image and I want that it were full loaded before the webpage shows it, because that I want that it seems like a video and if it isn´t fully loaded it doesn´t seem a video. Anyone can help me?? I
scite on Ruby 1.9
Thu, 11 Mar 2010 16:38:04 UT
Hi everybody, I am a novice in programming and I am actually having fun with Ruby. With Ruby 1.8.6, scite works well. However, this helpful tool does not come with Ruby 1.9. My question is to know how I can make scite works with Ruby 1.9 It's a real pain in my neck actually. Thank you in advance for your assistance



