[Rails] Re: "uninitialized constant PostsController::Post"

2011-04-30 Thread amrit pal pathak
On Apr 30, 12:08 pm, Colin Law wrote: > On 30 April 2011 16:40, amrit pal pathak wrote: > > > This time i read scaffold tutorial very  carefully and finally try to > > generate a form without using the scaffold(just used a controller and > > view ).what i have done till now ,is as follow.Using

[Rails] More detailed Test::Unit error report

2011-04-30 Thread Gustavo de Sá Carvalho Honorato
Hi, I'm starting to use Test::Unit to create unit tests for my Rails Applications/Plugins. I don't have much experience in Ruby Unit Testing. The problem is that the output report is very simple and it is very difficult to discover where is the error. Test::Unit does not show the line number of th

[Rails] Rails 3 with TinyMce

2011-04-30 Thread heithem nouira
Hi, I'm using TinyMce with Rails 3 to input rich text. when i enter a text into tinymce editor , the text is saved in the database as text so a p tag is added to the text!!. i need some help Best regards. -- You received this message because you are subscribed to the Google Groups "Ruby on R

Re: [Rails] Re: Strange behavior

2011-04-30 Thread Ernesto Rocha
I'm using csrf_meta_tag and the the headers appears correctly. The problem is when the athenticity_token has a plus sign and I use any of Jquery ajax function. So I tried to render the form_authenticity_token already escaped using that method above ( CGI.escape), but now the jquery ajax function wo

[Rails] Re: Best Rails environment for Windows 7

2011-04-30 Thread Adam Ms.
Colin Law wrote in post #995944: > A cautionary note, a new version of Ubuntu (11.04) has just been > released, which has made major changes to the UI and still has some > teething issues. I would advise an Ubuntu newcomer to install 10.10 > for the moment (or even 10.04, the so called Long Term

[Rails] Modify Gemfile and lock

2011-04-30 Thread Mohammad E.
So I'm working on making my own heroku like stack. I have everything except the hooks done now. My problem is that when I modify the Gemfile to include MySQL2 if it's not already included, that I have to also modify the Gemfile lock. Is there any library that can help with this? -- Posted via htt

Re: [Rails] Best Rails environment for Windows 7

2011-04-30 Thread Andreas Saebjoernsen
Disclaimer: I really like the unix model of building products. The objection I've heard is specifically for - gems that depends on native packages in the repository - ruby, rvm and ruby that is already in the native package manager The idea expressed was that dependencies are already explici

[Rails] Re: Re: Re: Re: Form parameters not passing to controller

2011-04-30 Thread David Mr.
Colin Law wrote in post #995978: > On 30 April 2011 18:00, David Mr. wrote: >>> >>> So gamma[:C] is not a collection. Have a look at the Rails Guide on >> >> >> attr_accessor :setA, :setB, :setAList, :setBList, :google > > First I would stick to the Rails conventions when naming things, so > these

Re: [Rails] CSV Export error

2011-04-30 Thread Frederick Cheung
On 30 Apr 2011, at 20:04, bertly_the_coder wrote: > Hi guys, When I export data into a .csv file, it works perfectly. when > I push the code to heroku, I get the following error: > ActionView::Template::Error (can't convert Hash into String): > Are you running the same ruby version locally and

Re: [Rails] Best Rails environment for Windows 7

2011-04-30 Thread UNIXgod
On Sat, Apr 30, 2011 at 10:34 AM, Andreas Saebjoernsen wrote: > The native package manager generally has very outdated ruby and rvm > versions. > I know this hurts unix purists, but it's your time and using rvm/gem/rails > like most other people do will save you a lot of time. rvm is a user sandb

[Rails] CSV Export error

2011-04-30 Thread bertly_the_coder
Hi guys, When I export data into a .csv file, it works perfectly. when I push the code to heroku, I get the following error: ActionView::Template::Error (can't convert Hash into String): My helper to generate the csv is: def generate_csv csv_str = CSV.generate(:col_sep => ",") do |csv| En

Re: [Rails] Best Rails environment for Windows 7

2011-04-30 Thread Andreas Saebjoernsen
Type. I meant the tips I've used when installing rails on Linux, not Windows. On Sat, Apr 30, 2011 at 8:34 AM, Andreas Saebjoernsen < andr...@digitalplaywright.com> wrote: > I think the tips I've used when installing rails on Windows is this: > >1. Do not use the native package manager to ins

Re: [Rails] Best Rails environment for Windows 7

2011-04-30 Thread Andreas Saebjoernsen
I think the tips I've used when installing rails on Windows is this: 1. Do not use the native package manager to install ruby, rvm and gems. - Install your own custom rvm, ruby and rails. - The native package manager generally has very outdated ruby and rvm versions. - I

Re: [Rails] [rspec-rails] Is it bad form to use spec/requests/*_spec.rb for integration tests?

2011-04-30 Thread Alex Katebi
http://jeffkreeftmeijer.com/2011/acceptance-testing-using-capybaras-new-rspec-dsl/ A lot of people prefer RSpec for integration testing too. You only have to deal one test framework RSpec for all your testing. On

Re: [Rails] Re: Re: Re: Form parameters not passing to controller

2011-04-30 Thread Colin Law
On 30 April 2011 18:00, David Mr. wrote: > Colin Law wrote in post #995918: >> On 29 April 2011 22:40, David Mr. wrote: > /home/brad/Documents/blogazer/app/models/search.rb:201:in >>> Here is the code from around line 201 in search.rb: >>> >>> def set_from_sources(sources) >>>  final = Set.ne

[Rails] Re: Re: Re: Form parameters not passing to controller

2011-04-30 Thread David Mr.
Colin Law wrote in post #995918: > On 29 April 2011 22:40, David Mr. wrote: /home/brad/Documents/blogazer/app/models/search.rb:201:in >> Here is the code from around line 201 in search.rb: >> >> def set_from_sources(sources) >> final = Set.new >> sources.each do |source| > > The error sugg

Re: [Rails] Testing download in controller

2011-04-30 Thread Jeffrey L. Taylor
Quoting David Kahn : > On Sat, Apr 30, 2011 at 8:14 AM, Jeffrey L. Taylor > wrote: > > > How can download of files be tested? The processing of the file is being > > tested okay, but I don't know how to simulate the controller call. > > > > What are you using to test? This is a bit off your top

Re: [Rails] "uninitialized constant PostsController::Post"

2011-04-30 Thread Colin Law
On 30 April 2011 16:40, amrit pal pathak wrote: > This time i read scaffold tutorial very  carefully and finally try to > generate a form without using the scaffold(just used a controller and > view ).what i have done till now ,is as follow.Using rails 3.0.7. > >                                 "r

Re: [Rails] "uninitialized constant PostsController::Post"

2011-04-30 Thread Walter Davis
On Apr 30, 2011, at 11:40 AM, amrit pal pathak wrote: This time i read scaffold tutorial very carefully and finally try to generate a form without using the scaffold(just used a controller and view ).what i have done till now ,is as follow.Using rails 3.0.7. "r

[Rails] "uninitialized constant PostsController::Post"

2011-04-30 Thread amrit pal pathak
This time i read scaffold tutorial very carefully and finally try to generate a form without using the scaffold(just used a controller and view ).what i have done till now ,is as follow.Using rails 3.0.7. "rails generate controller posts index" 1) post_controll

Re: [Rails] an advice for search.

2011-04-30 Thread Mauro
On 30 April 2011 00:13, David Kahn wrote: > > > On Fri, Apr 29, 2011 at 5:05 PM, Mauro wrote: >> >> On 29 April 2011 23:52, David Kahn wrote: >> > >> > >> > On Fri, Apr 29, 2011 at 4:41 PM, Mauro wrote: >> >> >> >> I have a Shop model with some attributes: >> >> >> >>  role_number   :integer(10

Re: [Rails] form label inside using jquery, outside without

2011-04-30 Thread Walter Davis
There's a great article on AListApart about this, from a few years back. Has a great Kevin Cornell illustration, too. Basically, you want to make your page in (rendered) HTML precisely the way non-scripted clients will see it. Then, when you load the page in a scripted browser, you do all t

Re: [Rails] change patial with change of the item in a select_tag

2011-04-30 Thread Walter Davis
On Apr 29, 2011, at 8:43 AM, Adel Mediouni wrote: hi, i would like to change a partial in my view with the change of the item in a select_tag: in the view: <%= observe_field("payment_id", :url => {:controller =>'user_admins' ,:action => 'rend_part'},:on => 'change', :frequency => 0.1) %> <%=

Re: [Rails] Testing download in controller

2011-04-30 Thread David Kahn
On Sat, Apr 30, 2011 at 8:14 AM, Jeffrey L. Taylor wrote: > How can download of files be tested? The processing of the file is being > tested okay, but I don't know how to simulate the controller call. > What are you using to test? This is a bit off your topic as it sounds like you are writing c

Re: [Rails] Best Rails environment for Windows 7

2011-04-30 Thread David Kahn
On Sat, Apr 30, 2011 at 7:36 AM, Ron Tsoref wrote: > First of all, thank you all for your suggestions. > I think I'll finally do the switch from Windows to Ubuntu. I wanted to do > it for a while, and I think it's a good time to do it now. > > Once I install Ubuntu, what should I do next? > > Goo

[Rails] [rspec-rails] Is it bad form to use spec/requests/*_spec.rb for integration tests?

2011-04-30 Thread Phoenix Rising
So I wanted to cook up a quick integration test for something, and I'm using rspec. I personally just don't like Cucumber - just a personal preference, not a slam to the test framework at all - and wanted to stick to just pure rspec. So I dumped a quick spec file in spec/ reqests and ran it, and

[Rails] Re: Best Rails environment for Windows 7

2011-04-30 Thread Phoenix Rising
Others have mentioned railsinstaller, which I highly recommend if you're just getting started. However, in my *personal* opinion, if you're going to get serious about Rails development, you really need some form of a *nix machine. The reason is that historically speaking, Rubyists have been somew

[Rails] Testing download in controller

2011-04-30 Thread Jeffrey L. Taylor
How can download of files be tested? The processing of the file is being tested okay, but I don't know how to simulate the controller call. TIA, Jeffrey -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email

Re: [Rails] Best Rails environment for Windows 7

2011-04-30 Thread Colin Law
On 30 April 2011 13:36, Ron Tsoref wrote: > First of all, thank you all for your suggestions. > I think I'll finally do the switch from Windows to Ubuntu. I wanted to do it > for a while, and I think it's a good time to do it now. A cautionary note, a new version of Ubuntu (11.04) has just been r

Re: [Rails] Best Rails environment for Windows 7

2011-04-30 Thread Ron Tsoref
First of all, thank you all for your suggestions. I think I'll finally do the switch from Windows to Ubuntu. I wanted to do it for a while, and I think it's a good time to do it now. Once I install Ubuntu, what should I do next? On Thu, Apr 28, 2011 at 8:02 PM, Bryan Crossland wrote: > On Wed, A

Re: [Rails] Re: Strange behavior

2011-04-30 Thread Frederick Cheung
On 30 Apr 2011, at 12:48, Ernesto Rocha wrote: > I did some brute force only to test, like this: > > > > > some characters are escaped, but now the link_to ... :method => delete is not > working anymore (the user session is killed). > > If I user URI.escape the plus sign is not escaped. >

[Rails] Re: How to extend a helper using plugin?

2011-04-30 Thread Alex Shulgin
On Apr 9, 1:43 pm, Alex Shulgin wrote: > > I can clearly see that UserHelperPatch is included on every page load, > while ApplicationHelperPatch is only included for the first time.  So > it somehow thinks it is included, but calls the wrong (unaliased) > method. I wonder if I might have better l

Re: [Rails] an advice for search.

2011-04-30 Thread Mauro
On 29 April 2011 23:50, Carina Brito wrote: > I use searchlogic. This gem is very easy. > Look this page 'https://github.com/binarylogic/searchlogic' In this asciicast http://asciicasts.com/episodes/251-metawhere-metasearch is said that searchlogic doesn't work with rails 3. -- You received thi

Re: [Rails] Re: Strange behavior

2011-04-30 Thread Ernesto Rocha
I did some brute force only to test, like this: some characters are escaped, but now the link_to ... :method => delete is not working anymore (the user session is killed). If I user URI.escape the plus sign is not escaped. So, i'm still at point zero. Thanks, Ernesto On Fri, Apr 29, 2011 a

Re: [Rails] Downloaded Ruby, where do I extract it to start?

2011-04-30 Thread Jens Fahnenbruck
What did you do so far? from your directories I see you're on linux or unix. So there shouldn't be the need to download ruby. In most linux it's already there, or you can install it pretty easy with the packet manage like apt on debian/ubuntu "sudo apt-get install ruby". On Mac OS X ruby version

Re: [Rails] Re: How to give link between two files of same view?

2011-04-30 Thread Colin Law
On 30 April 2011 06:47, amrit pal pathak wrote: > > > On Apr 29, 11:33 am, Hassan Schroeder > wrote: >> On Fri, Apr 29, 2011 at 8:08 AM, amrit pal pathak >> >> wrote: >> > I have one controller(home) with two methods(empty) ,name are >> > index,new).Corressponding have 2 .html.erb files in home