[Rails] Major update to Rails Assets

2016-04-27 Thread Josh Jordan
Hi all! Just wanted to announce a big update we made to Rails Assets https://rails-assets.org For those who haven't used it before, Rails Assets takes Bower components and packages them up as Ruby gems, to ease some of the pain of getting bower components working on Rails projects. No longer

[Rails] Re: Jackbox Release Candidate 2

2015-11-19 Thread Josh Jordan
What happened to your contest? On Wednesday, November 18, 2015 at 1:57:18 PM UTC-5, lha wrote: > > Today we released Jackbox RC2. > > With this release we have concluded the upgrade of the inheritance model > and are gearing up for version 1.0. The inheritance model in Jackbox now > has to

[Rails] Using Angular with Rails

2015-10-24 Thread Josh Jordan
Absolutely not. You can adopt the pieces you like and use Angular patterns within isolated parts of your application. Here's a blog post I wrote on iterative adoption of AngularJS: http://tech.novus.com/multiple-single-page-apps-adopting-angularjs-in-an-existing-application/ -- You received

Re: [Rails] Re: 10 tips to boost up performance of your Ruby on Rails application

2014-12-11 Thread Josh Jordan
While some of the advice here is good, it represents a very confused view of performance optimization. For instance, #2 is just plain bad advice for performance (but good for modularity) - partial rendering has a ton of overhead in Rails. #3 doesn't speak to performance at all. DRY (#4) is not

[Rails] Re: Implementing match-making with Ruby on Rails

2014-09-14 Thread Josh Jordan
I think this approach will be fine. The database is really good at getting you a single result quickly if that's all you ask for (e.g. PlayerQueue.where.not(player_id: current_player_id).order(:created_at).first). Some psuedocode: if the first player in the queue is still looking for a match

[Rails] Re: Relation count returns syntax error in Rails 4.1.X

2014-06-01 Thread Josh Jordan
Rails introduced a breaking change to select and count being used together in the same relation. Either remove your call to select, since it is unnecessary here, or call count(:all). More info here: https://github.com/rails/rails/issues/15138 On Saturday, May 31, 2014 8:00:36 PM UTC-4,

[Rails] How to invoke cache sweeper from background jobs / models?

2014-05-25 Thread Josh Jordan
MVC doesn't mean that all your logic has to be in a model, view, or controller. It sounds like you just need a class to do your import work, such can be called from a controller, background job, script, migration, etc. -- You received this message because you are subscribed to the Google

Re: [Rails] Looking for some glue between Strong Parameters and CanCan

2014-03-26 Thread Josh Jordan
I can verify that cancancan does this, and it does it out of the box if you use the convention of naming your Strong Params method #{model_name.underscore}_params https://github.com/CanCanCommunity/cancancan On Wednesday, March 26, 2014 8:04:02 AM UTC-4, Walter Lee Davis wrote: On Mar 25,

[Rails] AR: freezing PG Array

2014-03-14 Thread Josh Jordan
If that is true, the solution would be to properly mark the object as dirty when the array changes, not freeze the array. Why should this data type behave differently than all the others? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Re: why is my rspec controller test for get method not working?

2013-11-17 Thread Josh Jordan
I would have to contest that you didn't quite correct it then, eh? :p You wrote an expectation that says I expect @account to be an array of accounts that contains a single, specific instance of Account. Why are you looking for an array? Your controller code looks right - it assigns @account

Re: [Rails] Can we keep validation in memcached ?

2013-11-03 Thread Josh Jordan
Why do you think memcached is only useful for storing response data? That is simply not true. Memcache has been around longer than Rails, and is useful as a general purpose, fast, volatile data store. You can use it for anything you like, and it applies well in any case where there is

Re: [Rails] how is mongoid syntax implemented ?

2013-10-24 Thread Josh Jordan
That is valid hash syntax. You're call a method with a signature like: def field(field_name, options = {}) ... end field_name is a symbol, options is a hash where the keys are symbols and the values are constants (class objects). On Wednesday, October 23, 2013 9:30:28 PM UTC-4, Dheeraj Kumar

[Rails] Re: Rails 4 deprecation of in-place edit methods for collection associations

2013-09-24 Thread Josh Jordan
The justification for this change seems preposterous. Why would anyone think that, in the former example, the database has changed? The method called there is named select!. This sounds like a case of a few people writing fragile code without any understanding of what they were doing or the

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

2013-09-20 Thread Josh Jordan
Felix, You defined image_dir as a local variable in the scope of the Job class. It goes out of scope (and, since nothing else references it, gets cleaned up) after the class definition of Job is evaluated. Instead, define image_dir on *instances* of Job: class Job ActiveRecord::Base

Re: [Rails] Re: Having some issues on backend regarding a social networking project on ROR

2013-09-13 Thread Josh Jordan
Don't fool yourself into thinking that Facebook is using a single data store. Facebook has a massive set of resources Remember that they have their own PHP compiler. They are most certainly using multiple data stores redundantly and querying the right one for the job at hand for each

[Rails] Re: Combine two apps into one? Engines?

2013-07-19 Thread Josh Jordan
I think you're on the right track. It sounds like your views are not properly scoped to the engine, or you're trying to call routes from the engine that it doesn't know about. Can you try qualifying the routes with the application/engine they came from? See here:

[Rails] Autload thread safety in Ruby 2.0?

2013-06-15 Thread Josh Jordan
Jose Valim implies that autoloading is threadsafe in Ruby 2.0: The issue with this approach is that it is not thread-safe, except for latest JRuby versions (since 1.7) and Ruby master (2.0) http://blog.plataformatec.com.br/2012/08/eager-loading-for-greater-good However, the autoload bug

[Rails] Re: Introducing MailJack: autogenerate querystring parameters that are appended to links in your emails

2013-06-08 Thread Josh Jordan
Hi Peter. Pretty cool. I think the biggest thing you can do to improve the code here would be to write some tests for it, so you can give your users confidence that it won't break with each subsequent release. It would also be beneficial to include the word Rails in the description so that