[Rails] Generate migration in a template

2016-09-08 Thread Jonathan Allard
I discovered application templates today, and I've been banging my head against the wall for an hour now about generating a one-line migration. g = Rails::Generators::Base.new g.extend Rails::Generators::Migration g.instance_variable_set(:@source_paths, [File.expand_path(File.dirname( __FILE__))

[Rails] Re: Confusion around form_for defaults and json/js

2015-06-25 Thread Jonathan Allard
I'll include the ASCIIcast for brevity for others: http://asciicasts.com/episodes/136-jquery -- 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 to rubyonrails-

[Rails] Re: Confusion around form_for defaults and json/js

2015-06-25 Thread Jonathan Allard
> > On Thursday, June 18, 2015 at 2:41:53 AM UTC-4, Jonathan Allard wrote: >> >> With Convention over configuration, you can usually trust the defaults to >> get you there. In this case, not so much. I've been banging my head on the >> wall for a few hours no

[Rails] Confusion around form_for defaults and json/js

2015-06-17 Thread Jonathan Allard
With Convention over configuration, you can usually trust the defaults to get you there. In this case, not so much. I've been banging my head on the wall for a few hours now, in between trying things and researching. For the usual cases, how do I set up an AJAX form. Is it using JS or JSON form