[Rails] Method telling whether an ActiveRecord has been newly created (and already persisted)?

2015-10-20 Thread Eugene Gilburg
Several times I found myself of need of a method that tells whether an ActiveRecord instance has just been created. For example, when writing generic activity logging code that needs to know whether model is newly created as opposed to updated, but the invocation is in a service outside of the

[Rails] Reloading page in $.post 'done' callback not working

2015-10-20 Thread Dave Ekhaus
Hi All. Within the 'success' callback of a $.post call - I'm trying to reload the current page (here's a pastie -> http://pastie.org/10496733) My 'post' call works and now I'd like to refresh the page. Please help. (I realize that refreshing the page is not ideal - but its a very 'ligh

Re: [Rails] Re: The Basics of Creating Rails Plugins

2015-10-20 Thread Frederick Cheung
On Monday, October 19, 2015 at 4:15:38 PM UTC+1, Colin Law wrote: > > On 19 October 2015 at 16:04, Frederick Cheung > wrote: > > > > > > On Monday, October 19, 2015 at 3:27:52 PM UTC+1, Bharat Manghnani wrote: > >> > > > > FYI, plugins were removed in rails 4.0 > > There seems to be a co

[Rails] Re: Login modal using default rails ajax request not working with subdomains

2015-10-20 Thread Chris Ward
Sorry to tell you, but this behavior is by design. You'll have to put it on the same subdomain as the accessed page or use a workaround like an API. This is actually a limitation of AJAX. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Go

[Rails] Missing engine:install:migrations task for plugin/engine --mountable (Rails 4.2.4)

2015-10-20 Thread Dr. Jackanapes
According to the Rails guides (http://guides.rubyonrails.org/engines.html), after creating an engine using --mountable, there should should be a rake task in the parent app (not the engine), in the format rake :install:migrations for copying engine migrations from the Rails engine into the paren

[Rails] Re: Rails DB - explore DB and run SQL inside your App

2015-10-20 Thread Igor Kasyanchuk
https://github.com/igorkasyanchuk/rails_db inspect DB without any DB viewer Demo: https://rails-db.herokuapp.com/rails/db New Features: import SQL file Other changes: some refactoring bug fixes added some tests -- Posted via http://www.ruby-forum.com/. -- You received this message because

Re: [Rails] Code to be run on server start up

2015-10-20 Thread Matt Jones
On Friday, 16 October 2015 12:30:45 UTC-4, Mike Witt wrote: > > On 10/16/2015 09:21:44 AM, Hassan Schroeder wrote: > > On Fri, Oct 16, 2015 at 8:46 AM, Mike Witt > wrote: > > > In Rails 4.2, is there a place where I can put code that I want to > > be called > > > immediately after the rail

[Rails] Heroku ffmpeg buildpacks

2015-10-20 Thread Manuel Quintanilla
I'm working on a video upload rails app and am using paperclip-av-transcoder, s3, Heroku. The main issue I'm concerned with is why dose the video uploads on mobile phones not work when the buildpacks - (ruby, ffmpeg) are set. If I set the buildpacks the videos should show as they show on deskto

[Rails] Rails selecting record that has particular records through has_many association

2015-10-20 Thread Bazley
I've set up a messaging system between characters as follows. Each character `has_many :conversations` with other characters `through: :chat_groups`. Fairly standard setup I expect. character.rb has_many :chat_groups, class_name: "Chat", foreign_key: "character_id