[Rails] Re: Rails Inline Form

2011-08-30 Thread Ezequiel Schwartzman
You mean this: Email: [Input text] Instead of this? Email: [Input text] You could put the input box inside the email label. Or you could edit the CSS with float: left; Or display: inline; For the email and input. Though I think it would be easy using the HTML markup. -- Posted via

[Rails] Should I duplicate the value of a related Model in the other Model for indexing with Sphinx?

2011-08-29 Thread Ezequiel Schwartzman
If I have a model named Entries and a HMABT relationship with another model Tags, and I use Sphynx for searching models by their tags, would it be convenient to save the tags name into the Entries table each time an Entrie is saved, and tell Sphinx to index Entries instead of Tags? Also, the Tags

[Rails] Is a bad practice to do this while testing with Rspec?

2011-08-28 Thread Ezequiel Schwartzman
I'm testing the validation of emails so I did the following: it 'should only allow domains names with numbers, letters, dots or dashes' do (%-\\|!#$\%/()=?¡;,:{}+'°+*[]¬~^@áéíóú´`_ -).each_char do |c| Factory.build(:user, :email = zequez@gm#{c}ail.com).should_not be_valid

[Rails] Re: Is a bad practice to do this while testing with Rspec?

2011-08-28 Thread Ezequiel Schwartzman
David K. wrote in post #1018921: On Sun, Aug 28, 2011 at 10:29 AM, Ezequiel Schwartzman li...@ruby-forum.com In my book this is fine you have a list of specific examples and it is clear what you are doing. I might go further and make sure that in fact it is the email which is valid

[Rails] How do I generate the Rspec file for an already existing model in Rails 3?

2011-08-22 Thread Ezequiel Schwartzman
I've seen guides for Rspec that say to use rspec_model script, but in Rails 3 you don't have the script folder, and the only Rspec generator that I have is rspec:install. The other way is generate them automatically when scaffolding, but I already have the model, controller and view files created

[Rails] Re: How do I generate the Rspec file for an already existing model in Rails 3?

2011-08-22 Thread Ezequiel Schwartzman
Well, calling scaffold with flag seems to do the trick. The only con is that I have to say no for each file, since Ynaqdh doesn't have a no to all option =/ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] [Linux] Error installing rails activemodel requires activesupport?

2011-08-20 Thread Ezequiel Schwartzman
Well, I'm trying to install Rails through gems in a Linux box `sudo gem i rails --pre` I'm getting this: ERROR: Error installing rails: activemodel requires activesupport (= 3.1.0.rc6, runtime) Which is funny, because when I check `gem list` I get activesupport (3.1.0.rc6) bcrypt-ruby

[Rails] Re: [Linux] Error installing rails activemodel requires activesupport?

2011-08-20 Thread Ezequiel Schwartzman
For the record, I just installed Ruby through RVM and it solved it. -- 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 rubyonrails-talk@googlegroups.com. To

[Rails] Where is the Rails-way to place view that is not related to any specific controller?

2011-08-10 Thread Ezequiel Schwartzman
Well, I have a sidebar in a website that is rendered inside the main layout. What I want to do is to put the sidebar in a separated file and then call = render :partial = sidebar.html.haml Just to have them in separated files. Where is the convention to put it? In the root of /app/views? In

[Rails] Re: Re: will_paginate appending escape=false to every page URL?

2011-08-10 Thread Ezequiel Schwartzman
Walter Davis wrote in post #1015942: On Aug 9, 2011, at 8:32 PM, Ezequiel Schwartzman wrote: Mislav Marohni? wrote in post #1015695: That might be a bug with older versions. For Rails 3, use will_paginate 3.0.pre4 or later: gem will_paginate, ~ 3.0.pre4 Darn, I feel stupid

[Rails] Re: Where is the Rails-way to place view that is not related to any specific controller?

2011-08-10 Thread Ezequiel Schwartzman
Frederick Cheung wrote in post #1015986: On Aug 10, 4:20pm, Ezequiel Schwartzman li...@ruby-forum.com wrote: In /app/views/application? In /app/views/layout? In a separated view folder? I often have app/views/shared or things like that. Fred Thanks, I'll do that ^^ -- Posted via http

[Rails] Re: Where is the Rails-way to place view that is not related to any specific controller?

2011-08-10 Thread Ezequiel Schwartzman
7stud -- wrote in post #1016015: Ruby on Rails 3 Tutorial puts them in the layouts directory, e.g. layouts/_sidebar.html.erb, which are then inserted into the application layout with: % render 'layouts/sidebar' % That seems rational, since the scaffolding creates a _form element, thanks ^^

[Rails] Re: Where is the Rails-way to place view that is not related to any specific controller?

2011-08-10 Thread Ezequiel Schwartzman
However, when you try to include a partial render from a layout and it is missing you can see that the paths where it search for the view are views/application and views/controller. So I assume that: shared partial renders should go into views/applications controller specific partial renders

[Rails] Re: will_paginate appending escape=false to every page URL?

2011-08-09 Thread Ezequiel Schwartzman
Mislav MarohniÄ? wrote in post #1015695: That might be a bug with older versions. For Rails 3, use will_paginate 3.0.pre4 or later: gem will_paginate, ~ 3.0.pre4 Darn, I feel stupid for not trying that first, thanks haha -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] will_paginate appending escape=false to every page URL?

2011-08-08 Thread Ezequiel Schwartzman
It's visually annoying to see every URL with escape=false appended to it. It doesn't even makes sense, disabling the escaping through a GET parameter? What? How do I disable it so the pages show up like ?page=1, instead of ?page=1escape=false ? -.- -- Posted via http://www.ruby-forum.com/. --

[Rails] How do I route to a public folder?

2011-08-08 Thread Ezequiel Schwartzman
What I'm trying to do is linking a domain to a public folder. match '/:any' = '/public/something/:any', :constraints = { :host = localhost } But match only accept a controller, so, how could I do this? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] How do I select the include order of CSS/SASS files?

2011-08-07 Thread Ezequiel Schwartzman
Hello, I'm tweaking around with SASS and I'm kind of stuck here. I did a /app/assets/stylesheets/reset.css.scss file, surprisingly it's included automagically in all controllers. The problem is that it's included after the layout CSS and before the controllers CSS, and I need it to be included

[Rails] Re: Rails generate tool takes about 20 seconds to start for any action

2011-07-25 Thread Ezequiel Schwartzman
Luis Lavena wrote in post #1012784: On Jul 24, 6:52pm, Ezequiel Schwartzman li...@ruby-forum.com wrote: OS: Windows 7 Ruby: 1.9.2 Rails: 3.1 RC CPU: Intel Code 2 duo 2.4Ghz HD partition: 60/112gb The problem is that it even takes 20 seconds to show the help command, ==the help command

[Rails] Rails generate tool takes about 20 seconds to start for any action

2011-07-24 Thread Ezequiel Schwartzman
When I run rails generate -h it takes a little more than 20 seconds to print anything, the other tools, like controller, model, scaffolding, migrations, etc, too. Any idea why this is happening? Since I'm really new with rails I tend to try all options and with this I'll be like the whole day =/

[Rails] Re: Rails generate tool takes about 20 seconds to start for any action

2011-07-24 Thread Ezequiel Schwartzman
Luis Lavena wrote in post #1012768: On Jul 24, 1:35pm, Ezequiel Schwartzman li...@ruby-forum.com wrote: When I run rails generate -h it takes a little more than 20 seconds to print anything, the other tools, like controller, model, scaffolding, migrations, etc, too. Any idea why

[Rails] [Windows] I have mysql2 (0.3.6): Rails asks for mysql2 ( 0.2.6) and doesn't start

2011-07-23 Thread Ezequiel Schwartzman
Hello, I'm really new to the Ruby and RoR world, so first of all, hi to all ^^ Now to the issue explained from the beginning: I had already installed a MySQL server (xampp) I installed Ruby from RubyInstaller. I installed rails from gem. I installed the DevKit manually. I installed a MySQL server

[Rails] Re: I have mysql2 (0.3.6): Rails asks for mysql2 ( 0.2.6) and doesn't start

2011-07-23 Thread Ezequiel Schwartzman
Frederick Cheung wrote in post #1012629: By at the end do you mean you did gem install mysql2 -- various build options -v 0.2.6 ? if so then that version option is getting passed to the extension building script, not to gem install. You want gem install mysql2 -v 0.2.6 -- various built