[Rails] I need advice

2015-03-28 Thread Felix Daniel Leal Corova
Hi, I am new to ruby on rails, I am a student of Ing. Infomatica. the 9th semester. Ruby on rails practicing, I've ever tell I need more information. I wonder if I can build the gems? or just experts? to use a Datagrid is necessary to install a gem? I am working on linux, ubuntu 14.10 rails 4.2.0

[Rails] Accessing model attributes in ActiveSupport::Concern module

2013-09-19 Thread Felix Gläske
if new image could not be written end end endend The error I get: undefined local variable or method `image_dir' for # on this line: File.open(Rails.root.join("public", "images", image_dir, new_image.original_filename), "wb") do |f|

[Rails] Nested Model Form Problem

2013-08-18 Thread Felix P
Hi, I try to solve this problem for nearly 5 hours now. I want to create Nested Model Forms like in the Railscasts tutorial: http://railscasts.com/episodes/196-nested-model-form-part-1?view=asciicast If I do it the same (only without nifty) the "new" Site of the CRUD methods doesnt show me the

[Rails] Ejecutar accion automaticamente

2011-11-18 Thread Felix Noel Abelardo
Hola a todos, me gustaria saber de que forma puedo ejecutar el codigo que tengo en una accion de forma automatica. Me explico mejor: Yo tengo un codigo que actualiza tablas de una base de datos con datos de otra, eso lo tengo hecho en Ruby on Rails con una accion de una vista pero me gustaria saber

[Rails] how it works with Proc object?

2011-09-06 Thread felix
def test yield end test do p "a" end i don`t know how yield function does in detail. why did i write yield and then the p 'a' works? i know that it is a Proc object , but i don`t know how it works. Is Proc do as a parameter? test do p "a" end and is this code which makes the output? thanks

[Rails] Subject on ar_mailer

2010-11-04 Thread Rodrigo Felix
ttp://www.promine.com.br/> *Rodrigo Felix de Almeida* Promine Tecnologia da Informação Gerente de Projetos Sun Certified Java Programmer -- 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] Noughts and Crosses layout with a variable number of entries

2010-10-15 Thread Felix Schäfer
ery cell but the first of each row to have a left border, style each row but the first to have a top border. (oh, and you have style stuff in class attributes, and you shouldn't have style stuff in your view in the first place, use classes and css.) Best, Felix -- You received this mes

Re: [Rails] The Rails Server

2010-10-09 Thread Felix Schäfer
, and others still installed through apt. What does "gem list" return when run as your user and root? Same thing for "gem environment". Best, Felix -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] How to do change password with old password confirmation aut

2010-10-06 Thread Felix Samy
I need to change the password with old password confirmation with authlogic -- 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-t...@googlegroups.com.

[Rails] Good idea to send encrypted password with activation link

2010-10-06 Thread Felix Samy
Is this good idea to send activation link with encrypted password -- 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-t...@googlegroups.com. To unsubs

Re: [Rails] Re: update the content of a column in a BD table

2010-10-05 Thread Felix Schäfer
as something doesn't work without even trying to fix it yourself will only get you what you have experienced already: silence. Best, Felix -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send emai

Re: [Rails] Re: rails3 validate email format

2010-09-27 Thread Felix Schäfer
Am 27.09.2010 um 12:57 schrieb Sunny Ezror: > Felix, I believe it does. In fact I did a quick check of both .info and > .me and they worked fine. The point being the localpart "f...@bar" (and yes, the quotes are part of the localpart) in "f...@bar"@rails.info, not th

Re: [Rails] rails3 validate email format

2010-09-27 Thread Felix Schäfer
ot;full" address, but a not-so-bad one). Anyway, I'm a little surprised that rails3 having gone from TMail to Mail hasn't added a validator that would re-use the one already present in Mail… Regards, Felix [1] http://github.com/alexdunae/validates_email_format_of [2] http://l

Re: [Rails] Re: superclass mismatch for class Tempfile

2010-09-23 Thread Rodrigo Felix
ready tried the following one (exactly how it is on the tempfile.rb), but it didn't work: *class Tempfile < DelegateClass(File) ... end* Should I enclose it by *module SomeModuleName ... end* ? Thanks in advance. Att. * Rodrigo Felix de Almeida* Promine Tecnologia da Informação - www

Re: [Rails] Re: superclass mismatch for class Tempfile

2010-09-23 Thread Rodrigo Felix
OK, but how can I know which class is instantiating TempFile or DelegateClass? I guess it is related to some plugin, but I`m not sure. Att. * Rodrigo Felix de Almeida* Promine Tecnologia da Informação - www.promine.com.br Project Manager Sun Certified Java Programmer On Thu, Sep 23, 2010 at 1

[Rails] superclass mismatch for class Tempfile

2010-09-22 Thread Rodrigo Felix
rails-2.3.8/lib/commands/generate.rb:2 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from script/generate:3 Att. * Rodrigo Felix de Almeida* Promine Tecnologia da

Re: [Rails] View and Controllers association

2010-09-13 Thread Felix Schäfer
sController object as you seem to think it will. Felix -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to ruby

Re: [Rails] Remove membership

2010-09-13 Thread Felix Schäfer
oogleGroups through the web interface, there should be an unsubscribe link in the right sidebar.) Felix -- 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-t...@googlegroups.com

Re: [Rails] Re: Using Rails 3 with Ruby 1.9

2010-09-03 Thread Felix Schäfer
Am 03.09.2010 um 18:28 schrieb Carl Jenkins: > Sorry, but what is rvm? http://lmgtfy.com/?q=rvm (it was the 3rd hit here, though I'd wager it might be the first in your locale) Felix -- You received this message because you are subscribed to the Google Groups "Ruby on Rails

Re: [Rails] Re: Require

2010-06-06 Thread Felix Schäfer
Am 06.06.2010 um 19:44 schrieb Ar Chron: > require "srinivas_to_do_his_own_homework" *sigh* Couldn't someone just block him from the list? BR, Felix -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To po

Re: [Rails] Compress css files with Rails

2010-06-04 Thread Felix Schäfer
ails. > > Does someone know what it is? See the :cache => true option of stylesheet_link_tag http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M002231 Felix -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&

[Rails] OpenID Authentication using AuthLogic

2010-05-21 Thread Felix
Hi, I am trying to implement openid authentication using authlogic. I have installed the open_id_authentication in the process but when I entered rake open_id_authentication:db:create --trace I get the following error (in /Users/felix/login) rake aborted! Don't know how to build

Re: [Rails] Passenger Processes Users

2010-05-02 Thread Felix Schäfer
e.html#PassengerUserSwitching Felix -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegrou

[Rails] ActionController::RoutingError

2010-04-26 Thread Felix
Hi All, I am just learning Rails. I had encountered a routing error, though I think I have specified the correct rules in the routing.rb. I have attached the code. Please help routing.rb map.connect ':controller/:action' map.connect ':controller/:action/:id' map.connect ':controller/:action

Re: [Rails] Array data type----What can Be Done

2010-03-28 Thread Felix Schäfer
ill be able to access > the array like an array > > i.e $x[0] # => 23 >$x[1] # => how > > .and so on > > I don't know what DATA TYPE to use and how to do it. See "Saving arrays, hashes, and other non-mappable objects in text columns" in

[Rails] Re: I18n and Rails 2.3.5

2010-03-20 Thread Rodrigo Felix
t 11:35 PM, Rodrigo Felix wrote: > Does anybody know if the word "services" can be a key into a i18n file? If > I use "service" I can get the value, but when I use "services" a > translation_mission error is showed. Really weird. > > > > > On Fr

[Rails] Re: I18n and Rails 2.3.5

2010-03-20 Thread Rodrigo Felix
Does anybody know if the word "services" can be a key into a i18n file? If I use "service" I can get the value, but when I use "services" a translation_mission error is showed. Really weird. On Fri, Mar 19, 2010 at 6:34 PM, Rodrigo Felix < rodrigofelixdealme...

[Rails] I18n and Rails 2.3.5

2010-03-19 Thread Rodrigo Felix
, i18n is working properly, but in this (http://dev.promine.com.br/servicos) one, it isn't? Any suggestion about what is happening? Thanks in advance. *Rodrigo Felix* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To pos

Re: [Rails] New Application

2010-01-21 Thread Felix Schäfer
socket: /tmp/mysql.sock > > What am I doing wrong? Two things that come to mind: 1. Did the migration creating the posts in the db run through correctly? 2. Did you start your "rails server" (be it script/server, passenger or whatever) in development mode? Felix-- You received

Re: [Rails] unsubscribe me

2010-01-07 Thread Felix Schäfer
Am 07.01.2010 um 16:47 schrieb Oluwayomi Oluwadara: > please remove me from this mailing list Please have a look at the footer google-groups adds to each and every mail in this mailinglist. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gr

Re: [Rails] not being able to access the info loaded by config.yml

2010-01-04 Thread Felix Schäfer
sing' > > what can be the reason? I think yaml keys need to be strings, not symbols, i.e. that would read: development: bit_ly: login: something api_key: secret history: 0 Felix -- You received this message because you are subscribed to the Google Groups "Ruby on Rails

[Rails] swf_fu doesn't work in IE7 and IE8

2009-11-21 Thread Rodrigo Felix
I've been trying to show a SWF animation using swf_fu but it doesn't work in IE7 and IE8. In FF it works properly. Did anybody face the same problem? I've already tried to access the page from many computers and none of them work. If you wanna see it, www.comunidadeboasemente.com A swf banner is s

[Rails] swf_fu doesn't work in IE7 and IE8

2009-11-21 Thread Rodrigo Felix
I've been trying to show a SWF animation using swf_fu but it doesn't work in IE7 and IE8. In FF it works properly. Did anybody face the same problem? I've already tried to access the page from many computers and none of them work. If you wanna see it, www.comunidadeboasemente.com A swf banner is s

[Rails] Re: Ruby and MySQL

2009-10-26 Thread Felix Schäfer
have done a little bit of reading of, I don't know, maybe the rails guides on the rails homepage, or any other tutorial out there? Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&qu

[Rails] Form helper for an array?

2009-10-22 Thread Felix Schäfer
han just an array of (in this case) strings. Any help appreciated, thanks! Felix --~--~-~--~~~---~--~~ 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 rubyon

[Rails] Re: Ensuring a password is Alpha-Numeric

2009-09-19 Thread Felix Schäfer
\Z to delimit the beginning and the end of the whole string in the regex, as opposed to ^ and $ only matching the beginning and the end of a line in ruby, who knows, maybe one your users will try to use a password with a newline in it ;-) Felix --~--~-~--~~~---~--~~

[Rails] Re: changing the path for map.resources

2009-09-16 Thread Felix Schäfer
:terms, :as => 'buzzwords' See the other options for resources here http://apidock.com/rails/ActionController/Resources/resources Regards, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Re: Hide image name

2009-09-09 Thread Felix Schäfer
Am 09.09.2009 um 11:01 schrieb sam rlo: > I want to hide the image name of an image when mouse over an Image.how > can i hide the image name. What Browser? What does the code in the view look like? What is the resulting html? ...

[Rails] Re: [Rails]

2009-09-04 Thread Felix Schäfer
Am 04.09.2009 um 10:29 schrieb sushma desai: > Can u guide me further like where i have to run the web servers of > redmine in Windows XP?? 1. The right place to ask would be the redmine forum. 2. have you even had redmine running before trying to install the plugin?

[Rails] Re: [Rails]

2009-09-03 Thread Felix Schäfer
Am 04.09.2009 um 06:57 schrieb sushma desai: > May i know how to install budget plugin in the redmiine software > My Redmine version is 0.8.0 Have you even read the docs? http://www.redmine.org/wiki/redmine/PluginBudget#Install

[Rails] attr_readonly and if/unless

2009-09-02 Thread Felix Schäfer
yway, does anyone know a way how to get this behaviour on 2.3.3 (other than writing custom setters, of course...)? Thanks, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: Ruby on Rails Project Opportunities

2009-09-02 Thread Felix Schäfer
enelux as being dead, and it always merely meant "Belgium, the Netherlands and Luxemburg". You may even want to look it up on wikipedia ;-) http://fr.wikipedia.org/wiki/Benelux Mit freundlichen Grüßen, Felix Schäfer Cyprès IT Solutions Tel: 0231-576-2677 --~--~-~--~~

[Rails] Re: Running a rake task from cron on a shared webhost (joye

2009-09-02 Thread Felix Schäfer
have to set them up yourself. Further information in 'man crontab' http://linux.die.net/man/5/crontab Best regards, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

[Rails] Re: Unnecessary queries

2009-08-21 Thread Felix Schäfer
oot.children.each do |child| result += my_awesome_helper(child) end end result += "" + "" end """ (yeah, ugly, and I'm not even sure the syntax is right, but you get the idea) You'd then just have to call the helper on the root node in you

[Rails] Re: Unnecessary queries

2009-08-21 Thread Felix Schäfer
ngle query and proceed from there. I have certain sets > that will generate over 100 queries this way, that's not pretty! > > Can anyone tell me what I'm doing wrong? Try using the view helper as described in the README http://github.com/collectiveidea/awesome_nested_set/tree/m

[Rails] Re: pdf export

2009-07-28 Thread Felix Schäfer
questions, or at least questions which seem to be asked by someone who has already researched a little bit on his own. Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. T

[Rails] Re: make setter private

2009-07-23 Thread Felix Schäfer
Am 23.07.2009 um 04:57 schrieb Ease Bus: > Felix, > > Wow! Thank you very much for the detail and clear answer. I knew > there was something wrong when I had to "throw" and "catch." I read > that such construct is rare. Following your advices, I have

[Rails] Re: make setter private

2009-07-21 Thread Felix Schäfer
Am 22.07.2009 um 05:22 schrieb Learn By Doing: > > Thanks everyone for your responses. Felix, your before_save > suggestion sounds promising. But will before_save be able to skip the > save operation if the "do some stuff" fails? > > What I want to do is this: alw

[Rails] Re: make setter private

2009-07-21 Thread Felix Schäfer
be even just in another function like: def do_some_stuff_with_and_set_x(val) # do other stuff self.x = val return whatever end My point here being that a setter should really just do that: set an attribute to a certain value. For any validation of sorts, y

[Rails] Re: Working Depot app? (not AWDWR-related)

2009-07-15 Thread Felix Schäfer
Am 15.07.2009 um 05:26 schrieb Marnen Laibow-Koser: > Felix Schäfer wrote: >> Am 14.07.2009 um 21:35 schrieb >> �lph� Bl��: >> http://www.netbeans.org/kb/samples/ruby-depot.html >> >> That's the code from AWDWR (Agile Web Development with Rails), an

[Rails] Re: Handle incoming mails in ruby on rails

2009-07-15 Thread Felix Schäfer
Am 15.07.2009 um 08:43 schrieb Ruby on Rails: > How to Handle incoming mails in ruby on rails? http://guides.rails.info/action_mailer_basics.html#receiving-emails Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

[Rails] Re: Working Depot app? (not AWDWR-related)

2009-07-14 Thread Felix Schäfer
ample", but thanks anyway :-) Felix --~--~-~--~~~---~--~~ 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 unsubscri

[Rails] Working Depot app? (not AWDWR-related)

2009-07-14 Thread Felix Schäfer
or not. I had a shot at google and github, but most of the results seem to be related to the AWDWR book or some other tutorials or classes. Anyone knows of something like that? Thanks, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed t

[Rails] Re: How to add default value to text_field_with_auto_complete

2009-07-13 Thread Felix Schäfer
/classes/ActionView/Helpers/FormTagHelper.html#M002016 . Felix --~--~-~--~~~---~--~~ 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@googlegrou

[Rails] Re: Time parsing issue

2009-07-11 Thread Felix Schäfer
Could it be that something on the way to the browser chokes on the leading whitespace? Maybe try the code in script/console, and continue adding stuff around your strftime(...) until you find the culprit. Regards, Felix --~--~-~--~~~---~--~~ You received thi

[Rails] Re: An implementation question

2009-07-10 Thread Felix Schäfer
or Report class, rather than subclassing it. If you think the logic invloved is too big an instance method, maybe creating a generic PDF::Builder (or whatever, that's shamelessly copied from XML::Builder) would be a better idea, that way you could reuse that "pdf building" or "

[Rails] Re: How to validate with validates_associated

2009-07-09 Thread Felix Schäfer
Am 09.07.2009 um 15:41 schrieb Ruby on Rails: > Please refrain from bumping so often, at the very best, it will annoy people who would be willing to help you... Felix --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: Question on attr_protected and attr_accessible

2009-07-09 Thread Felix Schäfer
hod: """ user_to_update.admin = params[:admin] unless !logged_in_user.admin? """ (and PLEASE do check this code before relying on it, that's off the top of my head). Doing it this way will make sure that no non-admin can change the admin status of a user. Regar

[Rails] Re: generating random odd integer

2009-07-09 Thread Felix Schäfer
ses/Kernel.html#M005974 As a side note: Google is your friend. Felix --~--~-~--~~~---~--~~ 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@google

[Rails] Re: How to install rail from source

2009-07-06 Thread Felix Schäfer
all gems you have in a local folder). Best, Felix --~--~-~--~~~---~--~~ 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 unsub

[Rails] Re: Read email in ruby

2009-07-06 Thread Felix Schäfer
der using actionmailer and go back to step 1... Regards, Felix --~--~-~--~~~---~--~~ 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@google

[Rails] Re: :all or noop operator for find_all_by_*?

2009-07-04 Thread Felix Schäfer
d_hosts = old_hosts.other_scope(some_param) unless some_param.nil?' to further chain the scopes and thus narrow the list of results as needed. Regards, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Rub

[Rails] :all or noop operator for find_all_by_*?

2009-07-03 Thread Felix Schäfer
d line. I admit that this is quite a simple a case, and that it doesn't add much complexity to the program, but I'll soon have to add some more filters and/or scopes, and I'd hate to make different calls depending on whether the option is set or not. Does anyone know

[Rails] Re: Regular expression

2009-06-20 Thread Felix Schäfer
t; or something like that, and if you still have problems understanding what is written there, come back and ask, if you are just too lazy to make even that little bit of research for yourself, then please stay away from this forum, thank you. Felix --~--~-~--~~~---~-

[Rails] Re: Make virtual attribute more "real"

2009-06-15 Thread Felix Schäfer
Am 13.06.2009 um 01:36 schrieb Felix Schäfer: > Am 13.06.2009 um 01:16 schrieb Robert Walker: > >> http://api.rubyonrails.org/classes/ActiveRecord/XmlSerialization.html >> >> From the bottom of the above page... > > > Yeah, I had read that one already, and that w

[Rails] Re: passenger and 2.2.2

2009-06-15 Thread Felix Schäfer
s youre activesupport gem is not up-to-date, or at least passenger doesn't see version 2.2.2 but version 1.4.2. The app with the frozen 2.2.2 will also have activesupport 2.2.2 frozne in there too, which allows it to run fine. Regards, Felix --~--~-~--~~~---~--~

[Rails] Check if an HTML element exists in rjs

2009-06-14 Thread Rodrigo Felix
to take some actions only if a certain element exists. Any suggestion? Thanks in advance. -- Rodrigo Felix Web Developer SCJP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gro

[Rails] Re: Help on Regular EXpression

2009-06-13 Thread Felix Schäfer
ubular.com/ to test your regexes. Regards, Felix --~--~-~--~~~---~--~~ 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 unsubscr

[Rails] Re: Make virtual attribute more "real"

2009-06-12 Thread Felix Schäfer
ibutes as columns in a migration, and leave them blank, but that makes for empty columns and seems more of a hack than a solution. Regards, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] Make virtual attribute more "real"

2009-06-12 Thread Felix Schäfer
o_xml and so on. Is there a way to tell the Child model that even if the attributes are virtual, I want some of them to behave like real ones? Regards, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Complex Relations / Avoid deletion of join model objects?

2009-06-10 Thread Felix Schäfer
I'm afraid that I won't be able to tackle that one with the standard built-ins, but I would be glad for any hints or help on how to best configure rails for that. Thanks, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribe

[Rails] Auto complete onclick

2009-05-25 Thread Rodrigo Felix
ze => 15}, {:url => users_path, :method => :get, :param_name => 'search'} %> Thanks in advance -- *Rodrigo Felix* Web Developer SCJP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] layout

2009-05-03 Thread Rodrigo Felix
g code it also didn't work. class UsersController < ApplicationController layout 'login', :only => [:forgot_password] layout 'application', :except => [:forgot_password] Does anybody have any suggestion to apply the login layout to the forgot_password method and the a

[Rails] Basic Doubts

2009-04-29 Thread Rodrigo Felix
o use what is on the database and on the current migration (the whole schema) Thanks in advance -- *Rodrigo Felix* Web Developer SCJP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

[Rails] Re: Locals in render partials

2009-04-03 Thread Felix
I tried your suggestion of passing locals as :@var on ruby 1.8.6 and rails 2.2.2 and it doesn't seem to work On Apr 3, 2:13 pm, Phlip wrote: > Nike Mike wrote: > > In render partials can we pass arrays like this > > > a=[1,2,3] > > b=[5,6,7] > > c << a << b > > > render :partial=>'',:locals=>{:c

[Rails] Re: RubyonRails GUI for Leopard?...

2009-03-30 Thread Felix
TextMate is definitely great. I have to give another vote for Netbeans though. It is free, runs on both Linux and OS X and it has by far the most features. The main disadvantage is that it is heavy, soe depending on your machine performance can be quite sluggish. On Mar 30, 1:44 pm, Eric Fer wr

[Rails] Re: problem starting mongrel server

2009-03-29 Thread Felix Guerrero
Abhishek shukla wrote: > kill running process called ruby.exe then start your server it wil > work.. > > regards > abhi Try this On Mac OS X: ps -U |grep ruby look for 39704 ttys0010:01.63 ruby ./script/server where 39704 is the PID, then sudo kill -9 39704 replace 39704 with

[Rails] Re: How to Get value of text_field ??

2009-03-09 Thread Felix
I can't really say what went wrong with the previous code you tried, but here is how i would do it: <%= text_field :contact ,:name,:class=>'roundRect',:id=>'name' %> <%=link_to_remote('Go', :url =>{:controller => 'main', :action=> 'search'}, :with => "'contact[name]=' + $(

[Rails] Re: Hover effect for column data field...

2009-03-09 Thread Felix
You might find this helpful: http://tracesof.blogspot.com/2009/02/creating-tooltips-using-rails-helper.html. Using this code you can wrap the content of your table fields in a "with_tooltip" block, which should give you the desired results. There are plenty of other resources on the same topic to

[Rails] Re: Can RoR do this? How easily?

2009-03-05 Thread Felix
Just out of curiosity: Why did they decide on distributing the app like this, instead of using a central database + web server? On Mar 4, 11:46 pm, Zonker wrote: > I am consulting on a software project which is database intensive and > the interface is web-based. Users can download an installati

[Rails] Re: Strange AR error ( column does not exist)

2009-02-24 Thread Felix Holmgren
Changing the column name from firstPeer to first_peer helped. Apparently postgre, as you pointed out, couldn't handle the camel case but automatically lower cased it. This was not any fault of AR's. On the contrary, in the code where I let AR create the SELECT, the field name was handled correctly,

[Rails] Re: replace_html with action template

2009-02-23 Thread Felix
Didn't test if it works, but did you try render :template => "your_template" ? On Feb 22, 7:13 pm, dimi3 wrote: > Hello All, > > I am trying to replace_html with an action template, not a partial. > Currently I don't know how do it, I've renamed all my action to have _ > in their names and I do

[Rails] Re: using #{} with instance variables inside prototypes $$()

2009-02-19 Thread Felix
:before => "$$('tr#task_#{completed_task.id} > td.task-title- cell').update('Reactivating')" should do the trick. Also you probably need to add a .first() after your $$() selector, since it always returns an array as far as i know. As for your question regarding style, I think there isn't really

[Rails] Re: Clilking on a link should replace that link with a form...

2009-02-19 Thread Felix
Ha, just thought of a much better way: (show.html.erb) <%= link_to_function 'New Journal' do |page| page[:new_journal].replace_html :partial => "create", :object => @user end %> On Feb 19, 9:35 am, Felix wrote: > You could do something

[Rails] Re: Clilking on a link should replace that link with a form...

2009-02-19 Thread Felix
You could do something like this: <%= link_to_function 'New Journal', "Element.replace(this, #{ render (:partial => "create", :object => @user).inspect})"%> check here for some gotchas with rendering partials this way: http://tracesof.blogspot.com/2009/02/rails-partials-in-javascript-function

[Rails] Re: dynamically generate fields in view

2009-02-18 Thread Felix
> Thanks! I will try that. Also, would it be possible to add validations > in the model for each of the sets? I don't think you can use rails' standard 'valtidates' methods, like validates_presence_of, but you can add your own custom validate method to your model: def validate self.errors.add

[Rails] Re: dynamically generate fields in view

2009-02-18 Thread Felix
if you name each of your (game)set input fields something like "set[]" then rails will parse the parameters as an array. This way you will give you a params hash like: { 'match' => { 'sets' => ['1','3','7']} } This means in your model you can define a virtual attribute called 'sets' like: def s

[Rails] Re: Pass a global variable from a partial from javascript

2009-02-18 Thread Felix
I am not quite sure I am following, but I understand that after updating your calendar using the method you provided you are trying to submit the current date back to the server whenever a user clicks to change the month? To understand what's going what's going on I would have to see your calendar

[Rails] Re: How to show div with radio button onclick

2009-02-17 Thread Felix
this should do it. You are inside HTML code and not inside a ruby string, so the #{} syntax won't work. Instead you have to use the Erb sequence <%= %> On Feb 17, 5:46 am, David wrote: > I am trying to get a div to show when a radio button is clicked but > the problem is that the div is dynami