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
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|
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
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
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
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
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
, 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
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.
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
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
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
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
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
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-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
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
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
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
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
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&
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
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
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
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
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
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...
, 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
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
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
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
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
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
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
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
\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
--~--~-~--~~~---~--~~
: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
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? ...
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?
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
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"
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
--~--~-~--~~
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
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
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
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
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
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
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
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
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
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
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
/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
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
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 "
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
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
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
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
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
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
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
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
--~--~-~--~~~---~-
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
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
--~--~-~--~~~---~--~
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
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
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:
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
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
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
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
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
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
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
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
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]=' + $(
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
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
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,
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
: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
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
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
> 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
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
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
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
89 matches
Mail list logo