Ruby on Rails »
How can I force require a file in the console?Mon, 26 Jul 2010 02:44:25 UT
I use rails-3.0.0.beta3 and ruby-1.9.2-preview3. I have defined some new methods in the application_controller.rb, and need to test them in the consle. If I changed some codes in the application_controller.rb. I should always restart the console. I have tried to use 'reload!' command, just dosen't work.
Changing the model_path.
Mon, 26 Jul 2010 06:29:58 UT
Hi, I'm new to RoR, but currently need to make some changes to my site to implement permalinks. Whenever I do a link, I use: category_path(category) and then the to_param permalinks it. The previous piece of code would link you to / categories/CategoryPermalink; the trouble is I don't want it to be /
Testing alias of link_to on Rails 1.2.6
Mon, 26 Jul 2010 09:58:06 UT
I'm trying to write a test for an alias of link_to on Rails 1.2.6, but it's always loading: vendor/gems/ruby/1.8/gems/acti onpack-1.13.6/lib/action_view/ helpers/url_helper.rb:67 instead of my version, written in a plugin. Any ideas?
seaches with ajax......
Mon, 26 Jul 2010 09:01:30 UT
I have problems using ajax in a search field. In view/layouts I have main.html.erb with code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[link]"> <html xmlns="[link]" xml:lang="it" lang="it">
collection_select not being submitted database
Mon, 26 Jul 2010 10:48:15 UT
Hi everybody, I apologize for my student's english. I got some problem with my Rails app, i got a collection_select who aren't submited & save in my database. After 2 days googling and didn't find anything helpful i'am asking your help. I had two tables: Crc and User: (I removed useless relation from others
Showing a string to user and saving an integer in the DB
Mon, 26 Jul 2010 11:07:32 UT
Hi, I would like to know the best practice for following situation: * For saving DB space, instead of saving a list of string values ("Implemented", "Non Implemented", "Partially Implemented"), I want to save an integer value (1, ,2, 3) * My doubt is how to manage this situation in terms of: * ActiveRecord has any kind of functionality for this?
loading a partial via AJAX
Mon, 26 Jul 2010 12:32:04 UT
Hi I accept that partials are not intended to be exposed via a URL However I'd like to load my basic _form.html.erb partial for my model to build basic AJAX form So one way to do this is to put something like this in the controller: def basic_form render :partial=>"form" end ...... but...... is there a cleaner way?
Auto_complete – create association to another model – handle foreign-keys - validation
Mon, 26 Jul 2010 11:15:48 UT
Hello, In the app that I’m currently developing I want to use the auto_complete plugin to create an association from the model “ticket” to the model “customer”. In the new ticket form I created the field “customer name” as an auto_complete field. The controller handles the lookup on the name field of the customer model.
Re-usable template pattern - yield?
Mon, 26 Jul 2010 12:55:59 UT
Hi all. I have something that's like a helper and like a partial but not quite either. Instead of typing this: <% if (page = ComatosePage.find_by_path("gen eral/explore")) || current_user.admin? %> <div class="quarter"> <div class="module"> <%= page ? page.to_html : "Comatose article 'general/explore'
No more @controller.expects in Test::Unit?
Mon, 26 Jul 2010 13:15:53 UT
Hi, In my functional tests it was convenient to use: @controller.expects(:admin?).a t_least_once.returns(true) to simulate requests which come from an admin user. But it seems that in Rails 2.3.8 it's gone away. What replaces it now? Thanks
[ANN] Typo 5.5 for Rails 2.3.8
Mon, 26 Jul 2010 13:21:08 UT
Hello, On July 22th, 2010, Typo version 5.5 named for famous photographer Richard Avedon was released to the public. Coming with a new admin and setup, Typo 5.5 runs on Rails 2.3.8. Being around since March 2005, Typo is (probably) the oldest blogging platform in Rails. It has a full set of feature you would expect from
Re: [Rails] Problem with named_scope using a count
Mon, 26 Jul 2010 14:01:31 UT
First you need to define "best". What is the overall rating for each post? Good minus bad? Total good and ignore the bad? Something more complex? How many "best" do you want? Once you've defined that, you can figure out how to do it programmatically for each post. Offhand I'd say this might wind up
form date helper with text year
Mon, 26 Jul 2010 14:23:36 UT
I have a date where the year range is more then I want to define in a select_date scaffold generated year range. My idea was to have the year entered as a text field and the month and day using something like: <%= select_month @person.born,:prefix => :person ,:field_name => "born(2i)" %>
how to generate jasper reports in rails
Mon, 26 Jul 2010 16:08:28 UT
Hi all, can anyone tell how to generate reports using jasper in rails thanks and regards kiran
problem installing validation_reflection plugin
Mon, 26 Jul 2010 18:10:30 UT
Greetings, I'm having a problem installing the validation_reflection plugin that I've never seen before and wonder if anyone can give me a clue as to what might be going on. C:InstantRails ails_apps eg ister>ruby script/plugin -v install git://github.com/redinger/vali dation_reflection.git Plugins will be installed using http
dynamic image
Mon, 26 Jul 2010 20:23:52 UT
Hi, I am developing a t-shirt shop. The feature i want to develop is a form where visitors can fill in there name and "on the fly" the name is printed on the t-shirt(image). Has someone what is the best practice to do this? Imagemagick, Javascript? Grt..remco
Glasgow Technology Network - Rails Meetup on 01-Sep-2010
Mon, 26 Jul 2010 20:56:29 UT
Dear all, We are having a presentation on Ruby on Rails on 01-Sep-2010 - [link] At Glasgow Technology Network we are committed to having regular events on leading edge and bleeding edge technologies. If you are in Glasgow and are interested to attend, please visit
Finding 'similar' objects
Sat, 24 Jul 2010 21:43:36 UT
Hello all, This is more of a theory question then a RoR question, but perhaps there is some gem to help that I am unaware of. I am trying to aggregate store listings provided by 15 or so online shops, some of them provide the manufacturer's SKU/MID information but some do not. When the SKU/MID is provided it is a simple matter to
Debugging rspec2 and rails3
Sat, 24 Jul 2010 22:33:45 UT
Hi, Is there a simple way to debug specs under rails3? I've installed rvm and I'm running ruby 1.9.2, I've tried alot of stuff to get my IDEs debugging my specs to no avail. I can run rdebug from the command line and debug it, but I cannot debug it from either RubyMine or NetBeans. The last time I tried attaching the (remote) debugger, my program
Rails3 Finders - OR conditions
Sun, 25 Jul 2010 16:20:12 UT
There just does not seem to be much information out their on Rails3 finders. The finders and chaining are basically "awesome", at least if you are doing Model.where().where() which generates AND conditions. Can't find much on OR condition examples, except putting the "or" conditions in text in the where arguments.



