Re: [Rails] Trying to figure out proper syntax for URLHelper for HTTP Referer

2011-03-22 Thread Chris Mear
On 22 Mar 2011, at 05:42, sol.manager sol.mana...@gmail.com wrote: I am trying to add a condition so a back button does not appear if the user arrived at the current page directly from a link offsite (eg., a link from a tweet). I do want the button to appear if the user arrived at the page

[Rails] noob question on active record

2011-03-22 Thread Herman
Hi all, Sorry if this is too obvious for most, but I am new to rails and ruby in general, so basically at lost at what I can do. Here is the set up. I've set up a parent and child relation (ie. parent has many child). The child object has these attributes (id, name, day, period), where day

[Rails] Authenticity Token!!!!!!!!!

2011-03-22 Thread huhooooooo
#Answer_controller def index Hi! I have next problem.. Please help me understand how token works?? I need create each form for each user.. i mean, one user can see my form only once! (unique session)... @answers=Hash.new if request.post? questions =

Re: [Rails] [Rubygem on shared host] undefined method map for nil:NilClass

2011-03-22 Thread Frederick Cheung
On 22 Mar 2011, at 05:44, David Lauzon li...@ruby-forum.com wrote: I can't start my Rails even using a simple ./script/about (see error output below). My app is using Rails 2.1.0 on a shared host where rubygems (1.6.1) and all application's gems are installed in user directory. It

[Rails] Re: help with rotues

2011-03-22 Thread Clint
I don't think you are on the right path here. First of all, create a has_many and belongs to relationship. That will solve a lot if problems for you. On Mar 20, 7:06 am, Quee WM li...@ruby-forum.com wrote: in my cities controller I have def for_provinceid   @cities = City.where(active =

[Rails] Re: noob question on active record

2011-03-22 Thread Sebastian Gräßl
Hej Herman, did you take a look at the group method. http://guides.rubyonrails.org/active_record_querying.html#group I bet you can do it easier. Best, Sebastian -- Sebastian Gräßl sebast...@validcode.me http://validcode.me -- You received this message because you are

[Rails] Re: Find monogo object using mongoid

2011-03-22 Thread Sebastian Gräßl
Hej Mike, the where-method takes a Hash to grab your records, so you either change your call to Task.find(params[:id]) or Task.where(:_id = params[:id]).first Best, Sebastian -- Sebastian Gräßl sebast...@validcode.me http://validcode.me -- You received this message

Re: [Rails] Tutorial for native Rails 3 upload to database?

2011-03-22 Thread Sebastian Gräßl
Hej Tod, the above example is a good start, but you need to keep in mind, that the upload attribute of the photo is actually a File object. This means you will need to copy it to a permanent location, because in that state it most likely is in the /tmp dir. Take a look at this tutorial:

[Rails] Re: A help for installing rails on windows

2011-03-22 Thread salim mandrekar
if u r getting this error which means the web server is not started, to start server type a command *rails server* in the command prompt -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: A help for installing rails on windows

2011-03-22 Thread salim mandrekar
the images shows that u have installed the netbeans, but no rails.. first install the rails framework -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe

[Rails] Re: A help for installing rails on windows

2011-03-22 Thread salim mandrekar
*refering to 2nd image.. it shows rails not install..* *click on the button which says install rails.* * * *after this your project wil be created. den just click on RUN.* *webrick server wil start which wil display the index.html file in d browser.* *http://localhost:3000* * * -- You received

[Rails] Re: Calling a controller action from javascript

2011-03-22 Thread johnwerry
Are you using Firebug to see if any Javascript errors are preventing the call from even ocurring? Did you see the syntax error in your .js? $('address_text) should be $ ('address_text') On Mar 21, 2:17 pm, vishy shubhambansa...@gmail.com wrote: Anyone?? -- You received this message because

Re: [Rails] New Rails user, slightly confused by `rails` command

2011-03-22 Thread Iain Barnett
On 21 Mar 2011, at 22:54, Hassan Schroeder wrote: On Mon, Mar 21, 2011 at 1:52 PM, yb iainsp...@gmail.com wrote: I've just installed Rails v3.0.5 and reading the guide http://guides.rubyonrails.org/getting_started.html#creating-a-new-rails-project. Where it says to do: rails new blog

[Rails] Erubis 2.7.0 release candidate

2011-03-22 Thread makoto kuwata
Hi all, I'll release Erubis 2.7.0 in this week. I want someone to check whether it works well with Rails 3. 2.7.0 gem: http://www.kuwata-lab.com/erubis/erubis-2.7.0.gem 2.7.0 tar.gz: http://www.kuwata-lab.com/erubis/erubis-2.7.0.tar.gz In this release, there are important enhancement and

[Rails] Error on ajax forms/links in jQuery UI tabs

2011-03-22 Thread Henrik
I've implemented jQuery UI tabs, and I get an error: When i submit a ajax form or link, it gets submitted multiple times. As seen in this Doom console output: DELETE http://localhost:3000/innmeldings/101 404 (Not Found) DELETE http://localhost:3000/innmeldings/101 404 (Not Found) DELETE

[Rails] Re: Routing issue

2011-03-22 Thread Linus Pettersson
Thank you. I'll keep it like this for now :) Anyone else has any thoughts in this matter? Best Regards Linus On 21 mar, 16:57, David J. Hamilton gro...@hjdivad.com wrote: Excerpts from Linus Pettersson's message of Mon Mar 21 08:37:33 -0700 2011: Hi and thank you for your reply!

[Rails] Re: Trying to figure out proper syntax for URLHelper for HTTP Referer

2011-03-22 Thread sol.manager
Thank your for input. The error message was syntax error, unexpected tIDENTIFIER, expecting kTHEN or ':' or '\n' or ';' ...request.env[HTTP_REFERER] is not set or is blank ; _erbout... It also looks like your correction did the trick. Thank you. On Mar 22, 2:14 am, Chris Mear

[Rails] Re: noob question on active record

2011-03-22 Thread Herman
Hi Sebastian, I did try group on activerecord, what I did was group by day. However, after that, how do I print out the table I layout before? On Mar 22, 5:23 am, Sebastian Gräßl sebast...@validcode.me wrote: Hej Herman, did you take a look at the group

Re: [Rails] Problems with SQLite3

2011-03-22 Thread Bryan Crossland
On Mon, Mar 21, 2011 at 11:14 PM, Hashbang Hashbang li...@ruby-forum.comwrote: Hi! I've got a very strange problem. Suddenly the SQLite3 Backend stopped working. Example 1: rake db:rollback == CreateProducts: reverting = --

[Rails] Replace Div using rjs

2011-03-22 Thread Aashish Pathak
http://stackoverflow.com/questions/5391451/how-to-replace-the-div-in-rails-3-using-ajax Please refer this for Question. I am not able to do Ajax in Rails 3. Please reply to it. Thanks, -Aashish -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Make client download and save files without showing file dialog box

2011-03-22 Thread Peter
On Mar 21, 11:30 am, Peter De Berdt peter.de.be...@pandora.be wrote: It's a browser thing, so no. Rails, PHP, Java, the Pope, none of them   can change something that's just part of how the browser itself was   programmed. Related question that I'm interested in but might also help the OP: Is

[Rails] Splitting up a long running task with delayed job

2011-03-22 Thread bingo bob
I have a method on my model that looks like this. def self.itunes_update # don't run it if it's already running if Setting.first.update_lock? puts updates locked # it's not running right now so run it else all_apps = self.all all_apps.each do |app| # do stuff with each

[Rails] Re: using postgres rails/rake fails

2011-03-22 Thread Robert R.
I have the same problems under Mac OS X Leopard. I am using ruby 1.9.2p180, Rails 3.0.5, rake 0.8.7 and gem 1.5.9. I installed postgres-pr, but after a rake db:migrate I got this message: rake aborted! no such file to load -- pg

Re: [Rails] Re: using postgres rails/rake fails

2011-03-22 Thread David Kahn
On Tue, Mar 22, 2011 at 9:30 AM, Robert R. li...@ruby-forum.com wrote: I have the same problems under Mac OS X Leopard. I am using ruby 1.9.2p180, Rails 3.0.5, rake 0.8.7 and gem 1.5.9. I installed postgres-pr, but after a rake db:migrate I got this message: rake aborted! no such file to

[Rails] Re: Problems with SQLite3

2011-03-22 Thread Hashbang Hashbang
Bryan Crossland wrote in post #988721: Your migration failed and you have a partially migrated database in SQLite. I would suggest dropping and recreating your test database by hand and then running your tests again. Unfortunately, that did not help. I deleted the database and recreated it

[Rails] Re: using postgres rails/rake fails

2011-03-22 Thread Frederick Cheung
On Mar 22, 3:30 pm, Robert R. li...@ruby-forum.com wrote: I have the same problems under Mac OS X Leopard. I am using ruby 1.9.2p180, Rails 3.0.5, rake 0.8.7 and gem 1.5.9. I installed postgres-pr, but after a rake db:migrate I got this message: rake aborted! no such file to load -- pg

Re: [Rails] Re: Make client download and save files without showing file dialog box

2011-03-22 Thread Colin Law
On 22 March 2011 14:36, Peter ppgeng...@gmail.com wrote: On Mar 21, 11:30 am, Peter De Berdt peter.de.be...@pandora.be wrote: It's a browser thing, so no. Rails, PHP, Java, the Pope, none of them can change something that's just part of how the browser itself was programmed. Related question

[Rails] Re: ActiveRecord: update a foreign key in an association table

2011-03-22 Thread Fabrice Fabrisss
Thank you for your advice, Colin, yes, it's a GnuCash application which assigns an account to transactions based on keywords I solved my problem by defining a primary key on the association table 'Splits': class Split ActiveRecord::Base set_primary_key :guid ... end Sincerely,

[Rails] Re: Can't seem to install RMAGICK on Ubuntu Karmic Koala

2011-03-22 Thread Guido S.
ct9a wrote in post #909051: hi guys, I have been trying to install Rmagick on ubuntu karmic koala for a day. Yes, ImageMagicK has already been installed and works great with paperclip and a few other perl scripts I have (which uses Image::Magick). The following is what the execution

[Rails] Sharing session data between domains

2011-03-22 Thread Owain
Hi, Has anyone come up with a clean(ish) way of sending data from a session in one domain to another session in another (SSL) domain. Both domains are on the same application. Scenario is: - collect data during the shopping process to create an order. The critical order data can be stored in a

[Rails] Re: Help overriding rescue_action_in_public in Rails 3

2011-03-22 Thread Nagachaitanya Vellanki
please try specifying layout at the top of the controller like layout 'application', :only = action_name Please refer to the rails documentation, there are other options like :except, if this helps -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] ACH Recurring Transactions on RoR?

2011-03-22 Thread J. Rodrigo Fuentes
Have you ever implemented an ACH recurring transaction using a RoR web-app? If so, I would like to hear about your experience. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] tests fail after activerecord rename_column

2011-03-22 Thread sreid
I've renamed a column in an activerecord table by migrating. I searched and changed all references from old column name to new column name in source / tests. However, a lot of my tests now fail with errors of the type : SQLException ... table has no column named old column name. I also did a

[Rails] Re: rails.vim - killing the server?

2011-03-22 Thread Philip C.
I have found that adding thin to my Gemfile allows me to successfully :Rserver! thin and :Rserver!- -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: tests fail after activerecord rename_column

2011-03-22 Thread djangst
You might need to run `rake db:test:prepare`. On Mar 22, 12:46 pm, sreid sa...@broadgairhill.com wrote: However, a lot of my tests now fail with errors of the type : SQLException ... table has no column named old column name. -- You received this message because you are subscribed to the

Re: [Rails] tests fail after activerecord rename_column

2011-03-22 Thread Walter Lee Davis
On Mar 22, 2011, at 12:46 PM, sreid wrote: I've renamed a column in an activerecord table by migrating. I searched and changed all references from old column name to new column name in source / tests. However, a lot of my tests now fail with errors of the type : SQLException ... table has no

Re: [Rails] Re: tests fail after activerecord rename_column

2011-03-22 Thread Colin Law
On 22 March 2011 19:31, djangst djan...@gmail.com wrote: You might need to run `rake db:test:prepare`. If the test database was still the old format then I would have expected the error when running the tests to be of the form SQLException ... table has no column named new column name rather

[Rails] Re: using postgres rails/rake fails

2011-03-22 Thread Robert R.
I could resolve the problem after reading this blog post and all the comments: http://flux88.com/blog/installing-postgresql-for-rails-on-mac-os-x/ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: yield, helpers with blocks, and double-output

2011-03-22 Thread Victor L.
If you look at the compiled template, any % % blocks are compiled to something like this: _buf 'div ...' Hence if you had the following (silly) ERB: % foo do |b| % li %= b % % end % the block portion would get compiled to: _buf 'li '; _buf ( b ) _buf ' ' Hence, if you yield to this

[Rails] How do you structure frontend / backend (admin) ?

2011-03-22 Thread Linus Pettersson
Hi! I'm new to RoR and I have worked in PHP before. The past year I've been working with Joomla! and got used to the separated frontend and backend. I want to have something similar in my Rails app. So, how do you do it? Do you create the admin area from scratch or do you use something like

[Rails] simple net/http request encoding

2011-03-22 Thread Jamal Soueidan
Hello, Just simple example with net/http. url = URI.parse('http://www.bt.dk') req = Net::HTTP::Get.new(url.path) res = Net::HTTP.start(url.host, url.port) {|http| http.request(req)} p res.body Gives me ? ? ? ? on some danish characters. I have no idea how to get the right encoding with

[Rails] Implementing auto complete for more than one field in Rails

2011-03-22 Thread Mohnish G j
Hi, I have an app, which implements a group feature. Each group has n members. Also, each group has a group specific profile pic to it. I have been able to implement auto complete for the group feature keeping in mind the group name alone. I have referred to the following tutorial for the same:-

Re: [Rails] How do you structure frontend / backend (admin) ?

2011-03-22 Thread Phil Crissman
On Tue, Mar 22, 2011 at 6:34 PM, Linus Pettersson linus.petters...@gmail.com wrote: Hi! I'm new to RoR and I have worked in PHP before. The past year I've been working with Joomla! and got used to the separated frontend and backend. I want to have something similar in my Rails app. So,

[Rails] obfuscated email not really obfuscated. but why not?

2011-03-22 Thread sol.manager
I have a page with an email address visible (so humans can print the page if necessary). I used the following to code to obfuscate the email. When I view the page source in my browser it appears all is well, but I was told today by the SEO person at our web developer that the email address is not