[Rails] Logging progname with Rails differs from Ruby

2012-05-22 Thread John
There are some differences in how Ruby 1.9.3-p198 and Rails 3.2.3 handle logging a program name. # Standard Ruby Logger: logger.error('program name'){'message'} logger.error('program name'){exception} # Rails: Rails.logger.error('message', 'program name') Rails.logger.error(exception, 'program na

[Rails] Looking to hire freelance Rails developers.

2012-05-22 Thread Jameson
Anyone interested, please send rates and portfolio or resume to care...@touchstudios.net Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-

Re: [Rails] i want a rails job

2012-05-22 Thread Riyanto Jayadi
hi alex, I got freelance remotely rails's jobs via freelance marketplace on odesk.com and freelancer.com . You can find this kind of on here too. [?] On Tue, May 22, 2012 at 1:24 AM, Jeremy Walker wrote: > Hello. > > England, Birmingham. > > > On 21 May 2012 19:21, Lupu Alexandru Emil wrote: >

Re: [Rails] Rails developer required.

2012-05-22 Thread Loganathan Sellapa
+1 :D regards, Loganathan ViewMe On Tue, May 22, 2012 at 12:52 PM, Michael Pavling wrote: > On 21 May 2012 22:57, Suraj B. wrote: > > If you are experienced rails developer please let me know. > > worst > > job > > ad > > ever > > -- > You received this message

Re: [Rails] Rails developer required.

2012-05-22 Thread cmittal
what's wrong with this? On Tuesday, 22 May 2012 12:52:06 UTC+5:30, pavling wrote: > > On 21 May 2012 22:57, Suraj B. wrote: > > If you are experienced rails developer please let me know. > > worst > > job > > ad > > ever > -- You received this message because you are subscribed to the Goo

Re: [Rails] paramater passing with ajax in rails

2012-05-22 Thread azizmb.in
Hey! Can you be a little clearer about what you are trying to accomplish? On Wed, May 23, 2012 at 11:48 AM, amvis wrote: > *view.html* > > <%= submit_tag "act",*:id => params[:id]*, :class => "*actcpn* btn > btn-success" %> > > *.js* > * > * > $(".*actcpn*").click(function() { > $.ajax({ > type

[Rails] Re: undefined method `paginate'

2012-05-22 Thread Amir Z.
> You dont have a "def paginate " method defined in your controller. > Anyway you'll probably want to use a pagination gem such as Kaminari, > which > includes all you need for that purpose. Hi Juan, Thanks for the help message. Juan I am newbie on ROR could you please help me how to install kam

[Rails] Re: Re: ERROR: could not find gem ferret locally or in a repository

2012-05-22 Thread Amir Z.
> maybe a > proxy is not set. > Hi Guilherme Guipereira Thanks for the help. I am newbie on ROR. So, I do not know how to set the proxy for it. Could you please help me to set it? Thanks Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

[Rails] paramater passing with ajax in rails

2012-05-22 Thread amvis
*view.html* <%= submit_tag "act",*:id => params[:id]*, :class => "*actcpn* btn btn-success" %> *.js* * * $(".*actcpn*").click(function() { $.ajax({ type: "PUT", url: "http://localhost:3000/pgm/activate/";, success: function(){ $('.nplabel').fadeIn(300).show(); $('.nplabel').fadeOut(3000); } }

Re: [Rails] rails-brakeman.com, an online service to find security issues in your rails projects

2012-05-22 Thread rubyonrailsx
Kudos, Man. Thanks for the great works you have done. -- rubyonrailsx Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Wednesday, May 23, 2012 at 7:56 AM, huang zhimin wrote: > Hi, > > I just released rails-brakeman.com (http://rails-brakeman.com/), it is an > online service to fi

[Rails] search option for 1 to many relationships

2012-05-22 Thread Roy
I made 1 to many relation ships with school and professorsearch option is working for professor but not for school. here are the erorrs and my code...please help--- ActiveRecord::RecordNotFound in ProfessorsController#index Couldn't find School without an ID Rails.root: /home/vmuser/works

[Rails] Heroku App Sending Blank Emails with Sendgrid

2012-05-22 Thread yellowreign
I'm a Rails newbie using version 3.1.4 for my Heroku (Cedar stack) app. I'm trying to figure out why my app is sending blank emails using Sendgrid, and I haven't had much success with their support after raising a ticket three business days ago, so I'm hoping someone here might be able to help

[Rails] rails-brakeman.com, an online service to find security issues in your rails projects

2012-05-22 Thread huang zhimin
Hi, I just released rails-brakeman.com, it is an online service to find security issues in your rails projects, it works based on Justin's great gem brakeman . Rails developers always write code fast, but sometimes they leave some security issues in thei

[Rails] Re: Creating formatted PDFs

2012-05-22 Thread Ar Chron
Marc C. wrote in post #1061690: > Except one part: I don't know how to > render correctly the HTML in the PDF file. > > Currently I use the Prawn library to create the PDF's. I use Prawn to generate pdf's, Nokogiri to parse the html portion and created an element_to_pdf method to walk the html, l

[Rails] Re: Calling destroy in a has_many_and_belongs_to and has_many :through

2012-05-22 Thread Ar Chron
Msan Msan wrote in post #1061478: > I've noticed that if I use associations with has_many_and_belongs_to > and i call a destroy method on an object of the association, the > record in the join table is automatically deleted. > If I use has_many :though, for example: > > Category > has_many :categor

Re: [Rails] Chain scopes with OR

2012-05-22 Thread Rogerio Medeiros
U try ? escopo: find_visibles, lambda { find_in_coverage|find_know_ missing} 2012/5/22 azizmb.in > Hi Gustavo > > Coincidentally, I was recently doing something similar. Older versions of > rails used to evaluate my previous solution using " | " to an > ActiveRelation. When this stopped I dont

Re: [Rails] Chain scopes with OR

2012-05-22 Thread azizmb.in
Hi Gustavo Coincidentally, I was recently doing something similar. Older versions of rails used to evaluate my previous solution using " | " to an ActiveRelation. When this stopped I dont know, or maybe I am just mistaken. In any case, I finally settled on using the squeel gem

[Rails] Re: Fields_for adding html (text) for hidden field

2012-05-22 Thread Ian Smith
Hey, this should do the trick: = form_for @user, :url => {:action => 'update'} do |f| = f.fields_for :roles do |r| - if r.object.for_object.present? = r.label :role, r.object.for_object.name = r.select :role, Role::Roles.options_for_select - else ="" = f.submit "Updat

[Rails] Re: [RESQUE]Question about queues

2012-05-22 Thread Martin Streicher
Have you looked at resque-lock or resque-loner? On Tuesday, 22 May 2012 08:28:48 UTC-4, Ruby-Forum.com User wrote: > > I just searched through the Resque plugins available at > https://github.com/defunkt/resque/wiki/plugins but I can't find a plugin > that fit my needs. > > -- > Posted via h

Re: [Rails] Chain scopes with OR

2012-05-22 Thread Gustavo de Sá Carvalho Honorato
@Rogerio: This way the scopes are merged with AND not OR @Jeremy: I've read README and I haven't found a way to join scopes with OR, as you mentioned. The only way I found is to join attributes with OR, not scopes. I've tried that hack (where_clauses.join('OR')) before too. The problem is that, fo

Re: [Rails] Creating formatted PDFs

2012-05-22 Thread Fernando Almeida
I use PDFKit https://github.com/pdfkit/PDFKit 2012/5/22 Marc C. > Hello, > > I'm writing a mail-merge application with Ruby on Rails. I have one > user-created template, wich he creates with a CKEditor (in HTML). I have > a list of members, and in the "mailings" controller I mix the template > w

Re: [Rails] Creating formatted PDFs

2012-05-22 Thread Walther Diechmann
Hi, thought I'd chime in on this issue - as I've done a _lot_ of PDF-ing I took the Flying Saucer (see link below) - and baked in a little barcode sweetness - but alas it is far from public domain worthy code (read: no tests, no documentation and spaghetti-code) :( but, in short - I call mo

Re: [Rails] Creating formatted PDFs

2012-05-22 Thread Walter Lee Davis
On May 22, 2012, at 11:00 AM, Marc C. wrote: > Hello, > > I'm writing a mail-merge application with Ruby on Rails. I have one > user-created template, wich he creates with a CKEditor (in HTML). I have > a list of members, and in the "mailings" controller I mix the template > with the members dat

[Rails] Creating formatted PDFs

2012-05-22 Thread Marc C.
Hello, I'm writing a mail-merge application with Ruby on Rails. I have one user-created template, wich he creates with a CKEditor (in HTML). I have a list of members, and in the "mailings" controller I mix the template with the members data to create a PDF with a letter to every member. This is al

Re: [Rails] loop in rails view

2012-05-22 Thread Juan Pablo Avello
I would still iterate the elements that way, then you may extract the div construction to several partials or a helper receiving the key and value that deals with what to render on each case. It may sound a bit complex, but this way you keep your views clean, which are 90% of the times the dir

[Rails] functional tests assert_difference with array

2012-05-22 Thread Erwin
given a new partner instance and a new admin instance are created, what should be the difference number : +1 or +2 the doc is not so clear on it assert_difference [ 'Partner.count', 'Admin.count' ], +1 do... thanks for feedback -- You received this message because you are subscribed to the

Re: [Rails] loop in rails view

2012-05-22 Thread Jeremy Walker
On 22 May 2012 15:36, amvis wrote: > > > On Tuesday, 22 May 2012 10:23:53 UTC-4, Juan Pablo Avello wrote: >> >> >> >> El martes, 22 de mayo de 2012 15:56:54 UTC+2, amvis escribió: >>> >>> >>> >>> On Tuesday, 22 May 2012 09:34:20 UTC-4, azizmb.in wrote: Also, you could clean things a lit

Re: [Rails] loop in rails view

2012-05-22 Thread Michael Pavling
On 22 May 2012 15:36, amvis wrote: > basically  with that if condition, i need to show different div, > > <% @update_coupon.each do |doc| %> >       <% if  doc["value"] == 2 %> >          //code >       <%elsif  doc["value"] == 5 %> >         //code >       <%elsif  doc["value"] == 6 %> >        /

Re: [Rails] loop in rails view

2012-05-22 Thread amvis
On Tuesday, 22 May 2012 10:23:53 UTC-4, Juan Pablo Avello wrote: > > > > El martes, 22 de mayo de 2012 15:56:54 UTC+2, amvis escribió: >> >> >> >> On Tuesday, 22 May 2012 09:34:20 UTC-4, azizmb.in wrote: >>> >>> Also, you could clean things a little by doing: >>> >>> <% @update_coupon.select{|doc

Re: [Rails] loop in rails view

2012-05-22 Thread Juan Pablo Avello
El martes, 22 de mayo de 2012 15:56:54 UTC+2, amvis escribió: > > > > On Tuesday, 22 May 2012 09:34:20 UTC-4, azizmb.in wrote: >> >> Also, you could clean things a little by doing: >> >> <% @update_coupon.select{|doc| doc["value"] == 2}.each do |doc| %> >> do stuff >> <% end %> >> >> > T

Re: [Rails] loop in rails view

2012-05-22 Thread amvis
On Tuesday, 22 May 2012 09:34:20 UTC-4, azizmb.in wrote: > > Also, you could clean things a little by doing: > > <% @update_coupon.select{|doc| doc["value"] == 2}.each do |doc| %> > do stuff > <% end %> > > Thanks all i think the above one is working, but i am confused with other

[Rails] Re: undefined method `paginate'

2012-05-22 Thread Juan Pablo Avello
El martes, 22 de mayo de 2012 15:37:04 UTC+2, Ruby-Forum.com User escribió: > > I am working with Railsspace social networking book. I stuck in the > problem when i am doing paginate for the search result. It gives the > following error. > > NoMethodError in CommunityController#index > > unde

[Rails] Re: loop in rails view

2012-05-22 Thread Juan Pablo Avello
El martes, 22 de mayo de 2012 15:29:04 UTC+2, amvis escribió: > > *controller* > @update_coupon = JSON.parse(get_updatecpn.body) > * > * > *view* > 1, <% @update_coupon.each do |doc| %> > 2, <% if doc["value"] == 2 %> > > 3, <%end%> > > Here the *@update_coupon* getting from controller,In the co

[Rails] undefined method `paginate'

2012-05-22 Thread Amir Z.
I am working with Railsspace social networking book. I stuck in the problem when i am doing paginate for the search result. It gives the following error. NoMethodError in CommunityController#index undefined method `paginate' for # My Controller Index page coding is below def index @title = "Com

Re: [Rails] Re: ERROR: could not find gem ferret locally or in a repository

2012-05-22 Thread Guilherme Dutra
Or a gem's name is wrong. On Tue, May 22, 2012 at 10:34 AM, Guilherme Dutra wrote: > This have already happened with me, check your connection status or maybe > a proxy is not set. > > > On Tue, May 22, 2012 at 10:32 AM, Amir Z. wrote: > >> Please help me out! >> >> -- >> Posted via http://w

Re: [Rails] Re: ERROR: could not find gem ferret locally or in a repository

2012-05-22 Thread Guilherme Dutra
This have already happened with me, check your connection status or maybe a proxy is not set. On Tue, May 22, 2012 at 10:32 AM, Amir Z. wrote: > Please help me out! > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Gro

Re: [Rails] loop in rails view

2012-05-22 Thread azizmb.in
Also, you could clean things a little by doing: <% @update_coupon.select{|doc| doc["value"] == 2}.each do |doc| %> do stuff <% end %> On Tue, May 22, 2012 at 7:02 PM, Guilherme Dutra wrote: > I don't know if is the best solution but try a cast with to_i in > doc["value"]. > > doc["value"]

Re: [Rails] loop in rails view

2012-05-22 Thread Guilherme Dutra
I don't know if is the best solution but try a cast with to_i in doc["value"]. doc["value"] .to_i On Tue, May 22, 2012 at 10:29 AM, amvis wrote: > *controller* > @update_coupon = JSON.parse(get_updatecpn.body) > * > * > *view* > 1, <% @update_coupon.each do |doc| %> > 2, <% if doc["value"] ==

[Rails] Re: ERROR: could not find gem ferret locally or in a repository

2012-05-22 Thread Amir Z.
Please help me out! -- 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 unsubscribe from this group, send email to rub

[Rails] loop in rails view

2012-05-22 Thread amvis
*controller* @update_coupon = JSON.parse(get_updatecpn.body) * * *view* 1, <% @update_coupon.each do |doc| %> 2, <% if doc["value"] == 2 %> 3, <%end%> Here the *@update_coupon* getting from controller,In the controller i got all the value from *@update_coupon* so i need to take the value from t

[Rails] Re: Rendering partial views with ajax calls in rails 3.1

2012-05-22 Thread Joao Martins
Hi, Thank you very much 4 helping, working with render :partial => 'host2', :locals => { :host2 => @host } cheers, João On May 21, 11:18 pm, Walter Lee Davis wrote: > On May 21, 2012, at 8:45 AM, Joao Martins wrote: > > > > > > > > > > > I'm starting now with rails, and i have simply question

[Rails] Re: [RESQUE]Question about queues

2012-05-22 Thread Jeroen van Ingen
I just searched through the Resque plugins available at https://github.com/defunkt/resque/wiki/plugins but I can't find a plugin that fit my needs. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gro

[Rails] Getting Rails 3 Mailer working with gmail

2012-05-22 Thread Peter Hickman
This is the first time trying to get the mailer to work in 3.1.1 We are using gmail to handle our email at mycompany.com What we have is a contact us page that should send the email to the 'i...@mycompany.com' mailbox. At first I tried this with the sendmail setting and it worked fine on my devel

Re: [Rails] Beginning with BDD: Rspec or Cucumber? What is better documented?

2012-05-22 Thread thiagocifani
I think you should use cucumber and rspec together! If you want to do the out side in terminology like in rspec book, cucumber will handle easily with the integration's tests! I used to use cucumber and rspec to do tests in my application but in my new project we are using just rspec for all tes

[Rails] When to use iframes or partial views?

2012-05-22 Thread Michael Baldock
Hi All, I'm trying to work out the best way to implement a page with various sections. One section reports statistics about players in a team, the user selects from a row of player icons, and underneath this, a set of graphs are displayed. One way I thought of doing this was to have the 'graph v

[Rails] [RESQUE]Question about queues

2012-05-22 Thread Jeroen van Ingen
I run Resque with x 'general' queues. With 'general' I mean a queue that may run every type of Worker. Or in the Rake command: COUNT=x QUEUE=* rake resque:work When a worker runs a job of a specific class, it may not run another job of the same class simultaniously. This job has to wait until the

[Rails] Beginning with BDD: Rspec or Cucumber? What is better documented?

2012-05-22 Thread Joshua Muheim
Hey everybody I'm sorry, I know that this question seems to arise every few moments, but I think in my case it's a bit special (but doesn't everybody?). Well, I'm working with RoR on a private level since v1.0, and my knowledge about both Ruby and Rails are on a basic level (but definitely does e

Re: [Rails] Rails developer required.

2012-05-22 Thread Michael Pavling
On 21 May 2012 22:57, Suraj B. wrote: > If you are experienced rails developer please let me know. worst job ad ever -- 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.c