[Rails] Re: Which Company is Best on Ruby on Rails Development in India?

2015-07-11 Thread Martin Streicher
I have worked with Kiprosh for than five years. http://www.kiprosh.com On Wednesday, 22 January 2014 04:51:08 UTC-5, Ruby-Forum.com User wrote: Hi all, I looking for best company on Ruby on Rails Development in India. Have any good companies in India please let me know. -- Posted via

[Rails] Re: JOB POST: why is it so hard to find a Ruby Rails developer for a job in Downtown NYC?

2014-03-19 Thread Martin Streicher
If you are a senior Ruby dev and are looking for remote work, I know of a great job in Atlanta. (I am not a recruiter. I am also a Ruby dev.) Drop me a line and I can make connections. -- Martin -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: CanCan: How to define ability with some conditions

2014-02-17 Thread Martin Streicher
So you want to say The user can manage Realty if the agent has the right agency ID or if the agent is nil? If so, don't use the hash version of the condition. Go ahead and spell it out. You could also try agent: {agency_id: [nil, user.agency_id] ) -- You received this message because you

Re: [Rails] What's the best way to approach reading and parse large XLSX files?

2013-10-11 Thread Martin Streicher
I highly recommend the RubyXL gem. It opens xlsx files and seems very reliable. I use it all the time. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email

[Rails] Re: Rspec - want to NOT clear database between tests

2012-06-30 Thread Martin Streicher
before(:all) seems well-suited to this problem. It creates data that persists across transactions. https://www.relishapp.com/rspec/rspec-rails/docs/transactions -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on

[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

[Rails] Marginalia's :line option

2012-05-10 Thread Martin Streicher
I am trying to use the Marginalia gem's :line parameter. It emits something, but it seems to always say 'script/rails:6', as in... /*application:Realvolve,controller:contacts,action:index,line:script/rails:6:in `require'*/ This is at the top of application.rb: require

[Rails] Re: API documentation for find_in_batches

2011-04-09 Thread Martin Streicher
http://ryandaigle.com/articles/2009/2/23/what-s-new-in-edge-rails-batched-find http://apidock.com/rails/ActiveRecord/Batches/ClassMethods/find_in_batches Note that this API is deprecated in Rails 3. On Apr 9, 3:29 am, axelde...@gmail.com axelde...@gmail.com wrote: Hello, At

[Rails] Re: the store locator problem.

2011-04-09 Thread Martin Streicher
If you could use a tiny bit of JS in the form... 1. The new action: Render a form with the zip code and an empty list of stores. 2. The create action: Form submits the zip code, but no store data. Take the zip code, find the stores, and render the new action again, this time with the list of

[Rails] Re: Running code before allowing user requests?

2011-03-21 Thread Martin Streicher
It sounds like you want an admin mode to do some setup before the app goes live. If that's the case, why not have a special controller for that purpose and some logic to redirect to that controller if the app is in a nascent state? Seems like one of the wizard recipes could also apply nicely here.

[Rails] Re: which Rails 3 version ?

2011-03-15 Thread Martin Streicher
Use 3.0.5. Do not use 3.0.4. On Mar 15, 7:11 am, shyam shyammohankano...@gmail.com wrote: Hi all I am going to start new project so which rails 3 version should i go? currently i am working on rails 3.0.3 should i go for higher versions? like 3.0.5 etc Thanks and regards, Shyam ruby

[Rails] Re: [RUBY] how do generate a random number w specific distribution ( which library ?)

2011-03-15 Thread Martin Streicher
I use this often: class Uuid def self.uuid return rand( 18446744073709551615 ).to_s( 36 ).rjust( 13, '0' ) end end See http://blog.locomotivellc.com/post/3277434038/unique-ids On Mar 13, 4:45 am, Colin Law clan...@googlemail.com wrote: On 12 March 2011 23:29, Conrad Taylor

[Rails] Re: Info from Ruby file to Model?

2011-03-15 Thread Martin Streicher
The book Metaprogramming in Ruby teaches everything you need to know about modules and more. Also, you might the book Eloquent Ruby a very nice introduction to Ruby and its finer points. It's well-written and dives into all facets (no pun intended) of Ruby. -- You received this message because

[Rails] Re: how do generate a random number w specific distribution ( which library ?)

2011-03-15 Thread Martin Streicher
I don't think it makes a true UUID, but I've run it into the billions and never got a repeat. So, effectively, it acts like UUID. -- 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

[Rails] Re: Implementing Rails Like Filters in Rudy Program

2011-03-14 Thread Martin Streicher
Use the source, Luke. On Mar 14, 8:02 am, Vipin Nagpal vipin@gmail.com wrote: Hi, I have been given an exercise to write code for rails like before_filter and after_filter in pure Ruby. And not surprisingly I don't know how to do that. Please.. -- You received this message because you

[Rails] Re: Stack level too deep problem

2011-03-10 Thread Martin Streicher
Your associations are incorrect. Both Role and CriticalProcess refer to each other via has_many -- one of them must use belongs_to. And where is the Authorization class? What is it's relationship to CriticalProcess? Fix the associations problem and the loop will likely go away. Why? I suspect

[Rails] Re: Rails 3 and problem with conditions - no results

2011-03-10 Thread Martin Streicher
The preferred technique for Rails 3 is Data.where :name = 'abcd' I agree with Bryan you should check your data. You may need to strip the string of blanks before you save to the database. On Mar 10, 2:10 pm, Bryan Crossland bacrossl...@gmail.com wrote: On Thu, Mar 10, 2011 at 12:36 PM, Manny

[Rails] Re: Validates uniqueness two columns both ways?

2011-03-10 Thread Martin Streicher
Two ideas: 1. Create two unique database indices, one each for each pairing order and catch the exception on save on create. 2. Do it manually. errors.add(:base, 'already exists') if (Klass.where(:sender_id = sender.id, :receiver_id = receiver.id) + Klass.where(:sender_id = receiver.id,

[Rails] Stack Overflow question about Rails 3.1 engines and testing controllers

2011-03-04 Thread Martin Streicher
How+do+I+write+a+Rails+3.1+engine+controller+test+in+rspec? http://stackoverflow.com/q/5200654/73890 -- 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

[Rails] Re: Rails 3.0.5 has been released!

2011-02-27 Thread Martin Streicher
Is anyone seeing odd errors with 3.0.5? I am seeing odd behavior between 3.0.3 and 3.0.5. Namely, this statement... site.featured_medias.where(:media_type = media_class, :unfeatured_at = nil).order(created_at desc).first ... works in 3.0.3, but produces this bad SQL in 3.0.5 Mysql::Error:

[Rails] Re: Rails 3.0.5 has been released!

2011-02-27 Thread Martin Streicher
That code also works in 3.0.4, but does not in 3.0.5. -- 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

[Rails] Re: Rails 3.0.5 has been released!

2011-02-27 Thread Martin Streicher
Excellent catch. I extended my local list of unusual inflections in config/initializers. ActiveSupport::Inflector.inflections do |inflect| inflect.irregular 'media', 'medias' inflect.irregular 'missive', 'missives' inflect.irregular 'criterion', 'criteria' end -- You received this message

[Rails] Re: Rails Engine Questions

2010-12-31 Thread Martin Streicher
I'd love to see/hear the approach to design and build an engine. How can I use an engine to share code among like projects? Can I decompose a larger project into engines? What are the considerations and pitfalls? Mantras for design? On Dec 30, 8:07 pm, Alpha Blue li...@ruby-forum.com wrote:

[Rails] Re: contract work, San Francisco area

2010-08-01 Thread Martin Streicher
I cannot reach you. If you want to chat, you can ping me, since my Jabber ID is associated with this message. On Jul 29, 4:44 pm, Matt Jones al2o...@gmail.com wrote: On Jul 27, 8:22 pm, Fearless Fool li...@ruby-forum.com wrote: Craig White wrote: On Wed, 2010-07-28 at 01:27 +0200,

[Rails] Re: migration numbers

2010-07-30 Thread Martin Streicher
You can revert to the sequential numbering scheme by setting config.active_record.timestamped_migrations to false in config/ environment.rb. --Martin On Jul 30, 7:42 am, Ar Chron li...@ruby-forum.com wrote: If you really must have your three digit migration numbers, then just rename the file

[Rails] Re: draw ER Diagrams for models

2010-07-30 Thread Martin Streicher
You should also check out Visualize Models http://visualizemodels.rubyforge.org/#ba3e80f6c443b6cc58d7e04ff9e769df and Railroad http://railroad.rubyforge.org/ On Jul 28, 11:39 am, Juan Pablo Genovese juanpgenov...@gmail.com wrote: Jetbrains RubyMine IDE can do that. Sateesh Kambhamapati

[Rails] Generating a path from a route with requirements

2010-01-11 Thread Martin Streicher
I am trying to generate a path for a route with requirements. The route looks like this... map.courses_image_cache '/courses/image_cache', :controller = 'courses', :action = 'image_cache', :requirements = { :cache_id = /\d{8}-\d{4}-\d{5}-\d{4}/, :filename = /[a-zA-Z0-9_

[Rails] Re: Generating a path from a route with requirements

2010-01-11 Thread Martin Streicher
You are absolutely right. On Jan 11, 1:01 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Martin Streicher wrote: I am trying to generate a path for a route with requirements. The route looks like this... map.courses_image_cache '/courses/image_cache',     :controller = 'courses

[Rails] Re: Learning ruby on Mac - rake create error

2009-11-22 Thread Martin Streicher
I had this same issue with an older project but not with a new project, so I copied the newer database.yml file to the older project, renamed the database in the file, and then things worked. My new entry looks like this: development: adapter: mysql encoding: utf8 reconnect: false

[Rails] ruby-debug and Ruby 1.9.1

2009-10-22 Thread Martin Streicher
Has anyone built ruby-debug for Ruby 1.9.1? I am on Leopard. A check around the Web yielded issues with the pair, but no solution (I'll keep looking), hence my question. Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Keeping track of model changes with Paper Trail

2009-09-17 Thread Martin Streicher
Archive all versions of your model. http://www.linux-mag.com/id/7528 Thanks for reading. Martin --~--~-~--~~~---~--~~ 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

[Rails] Typekit brings typography to the Web

2009-09-02 Thread Martin Streicher
A new company, Typekit, is a font service provider. Your Web pages need not be drab anymore -- and its compatible with major browsers. http://www.linux-mag.com/id/7501 Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Rails] Hijack for Rails

2009-08-26 Thread Martin Streicher
I have written a short tutorial on using Hijack to debug running Ruby processes, including Rails applications. The article is available now at http://www.linux-mag.com/id/7492. Enjoy! Martin --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Hijack

2009-08-25 Thread Martin Streicher
I am attempting to get the Hijack gem to work on Leopard. It installs and runs, but it does not seem to breakpoint the Ruby process I choose. I am pretty sure I am not using it correctly. Does anyone have it up and running? What did/do you do to get to the debug prompt? Signal? Press a

[Rails] Edge Rails

2009-08-22 Thread Martin Streicher
I am writing five blog posts about the goodies that have appeared in Edge Rails over the last few months. Two columns were posted at the end of last week. Three more will appear next week. You may have read about some or all of the things in the posts, but perhaps the examples

[Rails] Re: Starting ruby script on server's reboot

2009-06-24 Thread Martin Streicher
Most modern crontab specifications support a @reboot meta-schedule. A job tagged @reboot /usr/bin/ruby /path/to/your/script.rb run would run whenever the machine restarted. On Jun 23, 7:47 pm, serenobs seren...@gmail.com wrote: Hi I'm using passenger + apache. with this combination, how

[Rails] Rip: A new package manager for Ruby

2009-06-17 Thread Martin Streicher
I've written an article on Github's new Rip package manager. You can find it online at http://www.linux-mag.com/id/7381/ Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

[Rails] Re: Developing with GNU Screen

2009-05-28 Thread Martin Streicher
Screen is valuable because you can start a session and then detach for any period of time and then resume. I've written about screen here: http://www.ibm.com/developerworks/aix/library/au-gnu_screen/ On May 27, 12:35 pm, Philip Hallstrom phi...@pjkh.com wrote: I hear a lot say GNU Screen is

[Rails] Sunspot: Search for Ruby and Rails

2009-05-27 Thread Martin Streicher
I've written an article on how to use Mat Brown's Sunspot gem with Ruby and with Rails. Sunspot is an easy way to add Solr (and thus Lucene) to any application. http://www.linux-mag.com/id/7341 Martin --~--~-~--~~~---~--~~ You received this message because

[Rails] Brief introduction to Gearman with Ruby for Linux Magazine

2009-05-14 Thread Martin Streicher
My introduction to Gearman with Ruby is now available on Linux Magazine at http://www.linux-mag.com/id/7330. My thanks to Andy Triggs, Eric Day, and the folks in the #gearman IRC channel who answered my questions. I am very anxious to see the next release of Gearman, which Eric intends to

[Rails] Micro-frameworks

2009-05-07 Thread Martin Streicher
I've written an article on micro-frameworks, featuring Sinatra for Ruby and Limonade for PHP. You can read the story online at http://www.linux-mag.com/id/7324 . I also wrote an intro to the Ruby debugger and how to use it in Rails. You can find it online at

[Rails] Re: Announcing a new Ruby journal

2009-04-04 Thread Martin Streicher
Michael Flynn got in touch and was issued a refund. --~--~-~--~~~---~--~~ 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

[Rails] Re: Announcing a new Ruby journal

2009-04-03 Thread Martin Streicher
I am just getting started and hope to draw in a lot of smart, expert contributors. Print on-demand will be handled by an online service such as MagCloud. Ads will be managed internally, as well subscriptions, at least at first. There will be a suite of technical reviewers to vet content. Again,

[Rails] Re: Announcing a new Ruby journal

2009-04-03 Thread Martin Streicher
Streicher martin.streic...@gmail.com wrote: 2 April 2009 My name is Martin Streicher. I am pleased to announce three new publications dedicated to web developers. Red: The Journal of Ruby Development Facade: The Journal of Front-end Development Tabula: The Journal of Open Source

[Rails] Re: Announcing a new Ruby journal

2009-04-03 Thread Martin Streicher
I went back to my records. These folks are owed $60 each. Hopefully, each person continues to read this forum; or, perhaps a friend or coworker will recognize one of the names and ask the individual to contact me. I can try some googling, too. David Alexander Muness Alrubaie Mark Andrews Peter

[Rails] A new column on Rails for Linux Magazine

2009-03-31 Thread Martin Streicher
I was Editor-in-Chief of Linux Magazine from 2002-2007. I've joined forces with LM again to lead the magazine's coverage of Web technologies, including writing my own column. Since I've been working in Rails a bunch, much of the column will focus on Rails, gems, and plug-ins. I had a short

[Rails] Re: Insert some value into a result of a find in a db.

2009-03-05 Thread Martin Streicher
Should be no problem. You can add an attribute to @version and it will be emitted when you render. Try it in the console. @version = Version.find(...) @version['path'] = 'somestring' @version.to_xml --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Content delivery networks

2009-03-03 Thread Martin Streicher
I am authoring an article for Amazon Cloudfront. Are there recommended techniques for working with content delivery networks in Rails? I have seen and used ActionController::Base.asset_host and am aware of the date parameter that Rails can attach to each static image to reflect its last

[Rails] Re: ActionMailer question

2009-02-19 Thread Martin Streicher
You can concat anything you want into the subject. The issue you have is with the last argument in your expression. You need to process it a little more to get it to a string. Specifically, you need to format the time string. On Feb 19, 3:11 pm, Alexander Annese alexann...@gmail.com wrote:

[Rails] RFC-1734 support?

2009-01-30 Thread Martin Streicher
Has anyone found a Ruby library to implement RFC-1734, the POP3 AUTH command? (I cannot be certain tyet, but it seems that POP3 AUTH is also supported as AUTH in IMAP4.) Chilkat seemingly offers a solution, albeit Windows only. Any open source stuff? Martin