This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Looking for the best way to update items in a table in mass below is the best I've come up with but it seems hacky and I've read that update() is depreciated | |
class Table < ActiveRecord::Base | |
... | |
class << self | |
def big_update | |
items = Table.all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm attempting to add the data attribute "data-region-id" to a simple_form input as shown in the excerpt in edit.html.erb. | |
However, when I do, I get the following error: | |
SyntaxError (/home/sam/Dropbox/railsproject/legal/app/views/people/edit.html.erb:20: syntax error, unexpected tLABEL | |
...t, input_html: {data-region-id: "person_state", class: 'coun... | |
... ^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Would put each of the variables into an object | |
var myVariables={}; | |
// giving values to variables (you can do this through whatever means you were intending) | |
myVariables['varAlcohol']="some value"; | |
myVariables['varMarijuana']="some other value"; | |
myVariables['varElse']="some else other value" | |
// Look for a change to the array of variables | |
$(myVariables).change(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started POST "/foos" for 127.0.0.1 at 2014-12-13 11:00:53 +0100 | |
Processing by FoosController#create as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"eLWiAFnILPySsw/b5h+BRtsk0UTbNJlsiTnllXvJuLuZGtxprb4lYTBmnvXsWqbmYnl3Rls0nW1tLz4+ydlu/w==", "foo"=>{"name"=>"foo", "bars_attributes"=>{"0"=>{"name"=>"bar1", "bazs_attributes"=>{"0"=>{"name"=>"baz1"}}}, "1"=>{"name"=>"bar2", "bazs_attributes"=>{"0"=>{"name"=>"baz2"}}}}}, "commit"=>"Create Foo"} | |
Completed 500 Internal Server Error in 1ms | |
ActionView::MissingTemplate (Missing template foos/create, application/create with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby]}. Searched in: ... |