Activity Graph

Page 1 of 3 | Next »


[23:22:38] zeknox: Quit: Leaving.


[15:35:16] zeknox: dionysus69: you may also be able to wrap it in a block, I've updated your gist with a comment example
[16:11:24] zeknox: zinefer: its defined within the model where the association takes place: https://stackoverflow.com/questions/7375680/activerecord-and-sorting-on-association


[17:02:57] zeknox: has joined #RubyOnRails
[17:03:53] zeknox: what is the best way to convert redirect_to :back, notice: 'blah' using the new redirect_back(), doesn't seem to take in the notice arg


[02:05:53] zeknox: Ping timeout: 250 seconds


[02:48:16] zeknox: has joined #RubyOnRails
[02:49:18] zeknox: can someone look at the sample snippet and help me understand if its possible to access a model attribute dynamically with the use of a string? https://gist.github.com/zeknox/c678f8f227ff50617f92bcf6dd264567
[02:59:56] zeknox: sevenseacat: thanks for public_send, it appears to be accessing the Model.attribute properly, but I'm not able to assign a value to the attribute as show in the example here: https://gist.github.com/zeknox/9ceba4a5673ba3650b55d484233c3143
[03:01:36] zeknox: sorry, im not following what the syntax looks like to set the attribute
[03:04:31] zeknox: sevenseacat: trying it out, but not making progress: https://gist.github.com/zeknox/9ceba4a5673ba3650b55d484233c3143
[03:11:01] zeknox: sevenseacat: thank you for the assistance, think I got what I was after: stock.send("#{dividend_attribute}=", 0)
[03:11:47] zeknox: sevenseacat: thats some low level stuff! wish I knew more meta hotness


[15:25:37] zeknox: Ping timeout: 252 seconds
[15:26:16] zeknox: has joined #RubyOnRails
[20:17:07] zeknox: Quit: Leaving.


[16:02:26] zeknox: what gem are you guys leveraging for client side validations? Something that looks at model validations and translates to client side would be great, integration with bootstrap, even better
[16:09:02] zeknox: universa1: sure, i found a number of gems, just wanted to get real world feedback from some experts here
[16:10:14] zeknox: i gave the requirements in my initial inquiry


[22:57:17] zeknox: has joined #RubyOnRails


[16:34:24] zeknox: Quit: Leaving.
[20:24:29] zeknox: has joined #RubyOnRails
[20:28:45] zeknox: Ping timeout: 250 seconds


[02:24:08] zeknox: Quit: Leaving.
[02:27:58] zeknox: has joined #RubyOnRails


[18:01:43] zeknox: has joined #RubyOnRails
[18:04:28] zeknox: what are folks using to encrypt the source code for apps that are to be shared?
[18:05:40] zeknox: so no one has wanted to protect their intellectual property with a rails app?
[18:33:47] zeknox: tildes: that sounds like something i'd be interested in, just install jruby and compile the rails app to bytecode?
[18:36:01] zeknox: tildes: any info would be much appreciated, never done the jruby side of things
[18:36:19] zeknox: tubbo: i also use private repos, but have a business need at times to run on clients hardware
[18:37:01] zeknox: tubbo: understood, that is why i have legal documents as well but giving away IP via open source is not the answer as well
[18:38:36] zeknox: tubbo: im exploring those options as well
[18:39:49] zeknox: tubbo: yeah but that will require the client has a hypervisor and i provide a VM, if they install an os on a physical box I have no support then
[18:40:57] zeknox: tubbo: yes, thats adding a bit of complexity into the whole scheme
[18:42:05] zeknox: tubbo: I tried the trial version of rubyencoder and I already have a poc working within minutes
[18:42:44] zeknox: tubbo: yeah but now my tests dont run once encoded lol
[18:43:55] zeknox: tubbo: no, I probably dont need to run tests, thats the only issue ive run into thus far, other than views are not encypted as well nor coffeescript or non .rb files
[18:45:09] zeknox: tubbo: yup, still entertaining which route to go


[02:57:56] zeknox: has joined #RubyOnRails
[02:58:15] zeknox: has left #RubyOnRails: ()


[15:49:01] zeknox: has joined #RubyOnRails
[15:49:35] zeknox: looking for something that functions like group_by but just returns the collection of ActiveRecord objects, not a hash, any insight?
[22:39:16] zeknox: has left #RubyOnRails: ()


[00:31:20] zeknox: what are you guys using to speed up your rspec tests?
[00:33:25] zeknox: right, but I thought there were gems to assist with running in parallel and loading the env into memory and such
[00:43:46] zeknox: quazimodo: thanks for the recommendation, ill check it out, my test base is becoming larger and guard takes awhile to reload the browser and such
[00:53:48] zeknox: oh yay, ran my tests with zeus and it doesn't know my methods for shoulda-matchers :/
[22:36:07] zeknox: Quit: Leaving.


[19:48:13] zeknox: has joined #RubyOnRails
[19:48:43] zeknox: is there a driver i can leverage for rspec feature tests to load javascript on the request without opening a browser?
[19:50:28] zeknox: slash_nick: thanks, i was looking into capybara-webkit for my needs, just wanted to see what everyone is leveraging
[20:05:11] zeknox: tubbo: thanks for the advice, any particular reason you like poltergeist over the others?
[20:24:33] zeknox: thanks guys, i was able to get poltegeist setup and test is passing
[20:35:05] zeknox: next if object.nil?


[01:00:13] zeknox: has joined #RubyOnRails
[01:04:34] zeknox: Client Quit
[01:52:34] zeknox: has joined #RubyOnRails
[01:55:30] zeknox: Client Quit
[02:25:05] zeknox: has joined #RubyOnRails
[02:25:43] zeknox: Client Quit


[01:20:38] zeknox: Quit: Leaving.
[01:21:08] zeknox: has joined #RubyOnRails
[02:13:41] zeknox: Quit: Leaving.
[02:16:33] zeknox: has joined #RubyOnRails
[02:29:54] zeknox: Quit: Leaving.
[03:13:26] zeknox: has joined #RubyOnRails
[03:31:19] zeknox: Quit: Leaving.
[14:49:38] zeknox: has joined #RubyOnRails
[15:01:53] zeknox: Quit: Leaving.
[17:21:25] zeknox: has joined #RubyOnRails
[18:08:39] zeknox: Quit: Leaving.
[18:44:56] zeknox: has joined #RubyOnRails
[21:55:04] zeknox: Quit: Leaving.


[09:58:11] zeknox: has joined #RubyOnRails
[20:26:22] zeknox: are there any currently maintained gems for in place editing?
[20:26:55] zeknox: something similar to rest_in_place
[20:32:58] zeknox: smathy: thanks man, ill check it out
[20:55:35] zeknox: smathy: do you know how to make jinplace send an http put/patch instead of the default post?
[21:00:07] zeknox: smathy: thats kinda lame considering it wont work with a default resource route in rails, amiright?
[21:01:48] zeknox: smathy: touche my friend, thanks, sometimes the obvious doesn't show itself until you mention it like that...
[21:12:27] zeknox: smathy: do you have an example of how you modify the span tags within the html to send properly with strong_params in rails?


[18:24:38] zeknox: has joined #RubyOnRails
[18:25:46] zeknox: what would be a good approach to downloading a screenshot of a highchart image part of a view? Need a PNG or JPG file somewhere stored locally
[18:29:41] zeknox: slash_nick: thanks for the link, that might be what im after
[18:30:41] zeknox: rhizome: you mean within highchart specifically?
[23:38:39] zeknox: *.net *.split


[01:45:44] zeknox: Quit: Leaving.


[05:40:24] zeknox: Quit: Leaving.
[14:43:25] zeknox: has joined #ruby


[02:39:24] zeknox: has joined #ruby
[02:39:24] zeknox: Changing host
[02:41:34] zeknox: anyone know of a way to use nokogiri xpath case insensitive without having to use translate() ??? my Gemfile.lock shows I'm using xpath 2.0 but I cant use lower-case() that is suppose to be added
[02:59:15] zeknox: Ox0dea: thanks for the link, I'll test that out
[02:59:55] zeknox: Ox0dea: its running slow as shiz and CPU is spiking pretty bad
[13:56:00] zeknox: *.net *.split
[18:32:18] zeknox: has joined #ruby
[18:32:18] zeknox: Changing host


[11:00:49] zeknox: Read error: Connection reset by peer


[15:36:54] zeknox: *.net *.split
[15:41:48] zeknox: has joined #RubyOnRails
[15:53:06] zeknox: *.net *.split
[16:48:08] zeknox: has joined #RubyOnRails


[18:47:27] zeknox: has joined #RubyOnRails
[18:49:45] zeknox: when creating a many to many relationship record like so: 'author.articles << article' , is it possible to access the article ID after this line is invoked?
[18:52:34] zeknox: jhass: assuming article is saved properly, how might i access article.id ?
[18:53:23] zeknox: jhass: unless im doing something wrong it comes back with 'undefined method `id' for nil:NilClass'
[18:54:18] zeknox: jhass: my bad, you are correct
[18:54:27] zeknox: jhass: i was accessing an object that didn't save
[21:56:48] zeknox: when are we going to see rails 5 in action, really hungry for some ActionCable
[21:59:57] zeknox: Radar: are you being serial or trolling?
[22:01:32] zeknox: Radar: wait, so why have all the blogs been saying rails 5 is coming this winter with ActionCable and such
[22:02:14] zeknox: zeknox: doh, why you gotta be like that :P
[22:02:32] zeknox: Radar: haha, i did not mean the book lol
[22:02:49] zeknox: Radar: I was just meaning in general when might we see some rails 5 with actioncable lol
[22:03:09] zeknox: wew! I can breathe again
[22:07:15] zeknox: back to the original question, when might we see some rails 5 released into action -not the book
[22:08:25] zeknox: ok, i guess i missed the boat somewhere...
[22:10:10] zeknox: perfect, where might i find the most upto date rails5 branch, don't see it on github or overlooked it perhaps?
[22:10:53] zeknox: Radar: so it sounds like you feel elixir and phoenix are superior to actioncable then?
[22:14:02] zeknox: Radar: so this is an entirely different lang / framework, not an addition to rails itself?
[22:15:00] zeknox: ah i c, was just looking for a little something to update my UI without polling in rails
[22:15:41] zeknox: will do, thanks!


[17:34:59] zeknox: has left #RubyOnRails: ()


[02:36:17] zeknox: Ping timeout: 256 seconds
[03:01:22] zeknox: has joined #RubyOnRails


[17:45:41] zeknox: has joined #RubyOnRails
[17:46:29] zeknox: how are you guys performing rspec tests with ActiveJob, ive read up on some examples, but my tests are invoking the sidekiq process which is for development mode and not test mode
[17:47:17] zeknox: tubbo: that sounds like the ticket, thank you, will report back
[17:48:54] zeknox: tubbo: perfect, that solved my issue with tests throwing dev sidekiq tasks
[17:49:29] zeknox: rhizome: thanks, i did see that but what were the examples really testing other than a job was queued??? dont we want to test the code within the job itself?
[17:51:52] zeknox: rhizome: yes, my jobs are a class
[17:52:33] zeknox: rhizome: i think i see where your going with this, test it like so SomeJob.new.perform(*args)
[18:09:33] zeknox: anyone know how i can run guard without the webserver running as well
[18:10:41] zeknox: rhizome: seems like the latest version of guard-rails runs webrick by default
[18:10:59] zeknox: rhizome: maybe its a combination of live-reload or something on my end
[18:12:01] zeknox: alright, so what is the best way to use breakpoints with guard-rails, using pry / binding.pry doesn't seem to function properly with guard, whats the reccomended method
[18:14:11] zeknox: tubbo: negative ghost-rider


[00:00:30] zeknox: smathy: thanks bossman
[00:01:11] zeknox: smathy: perfect! let me try that
[00:06:14] zeknox: smathy: Radar: thanks gents, its working properly! not sure I'm quite a fan of it quite yet, but I understand why it exists
[00:07:07] zeknox: is it safe to say that dependent: :destroy's are not necessary if you setup your on_deletes properly in the migrations?
[15:19:31] zeknox: Quit: Leaving.


[20:18:34] zeknox: has joined #RubyOnRails
[22:57:34] zeknox: whats the best way to override a models delete functionality to a destroy
[23:48:31] zeknox: Radar: I found out that what I really want is a on_delete: cascade as part of my migration, i guess this is new to 4.2 and that is why I'm getting foreign key errors
[23:49:06] zeknox: Radar: is there a way to pass this as an argument when creating the migrations from the CLI
[23:51:19] zeknox: Radar: based on this they make it sound like a migration option part of 4.2: https://robots.thoughtbot.com/referential-integrity-with-foreign-keys#cascading-deletes
[23:53:40] zeknox: Radar: do I have to do this as a seperate migration or can I just append this to my existing t.references: model, index: true, foreign_key: true, on_delete: :cascade ?
[23:54:24] zeknox: Radar: right, i get that, but wondering if what i have in mind is proper syntax
[23:56:14] zeknox: Radar: well the migration ran, now lets see if it works!
[23:58:33] zeknox: Radar: seemed to run, but still throwing the `violates foreign key constraint`


[02:30:30] zeknox: Quit: Leaving.
[04:00:27] zeknox: has joined #RubyOnRails
[04:52:35] zeknox: Read error: Connection reset by peer
[14:56:14] zeknox: Client Quit
[14:56:14] zeknox: has joined #RubyOnRails


[20:21:39] zeknox: has joined #RubyOnRails
[20:21:48] zeknox: do rails scaffolds no longer generate routes?


[14:36:04] zeknox: has joined #RubyOnRails
[14:54:26] zeknox: Quit: Leaving.
[15:32:32] zeknox: Client Quit
[15:32:32] zeknox: has joined #RubyOnRails
[15:33:43] zeknox: has joined #RubyOnRails
[15:33:46] zeknox: Client Quit


[00:05:07] zeknox: Quit: Leaving.
[01:01:56] zeknox: has joined #RubyOnRails
[02:03:14] zeknox: Quit: Leaving.
[04:05:14] zeknox: has joined #RubyOnRails
[04:13:23] zeknox: Quit: Leaving.
[05:01:06] zeknox: has joined #RubyOnRails
[05:02:49] zeknox: Client Quit
[06:09:31] zeknox: has joined #RubyOnRails
[06:39:27] zeknox: Quit: Leaving.


[19:02:08] zeknox: has joined #RubyOnRails


[04:08:56] zeknox: Quit: Leaving.
[14:54:47] zeknox: has joined #RubyOnRails
[14:55:43] zeknox: Client Quit


[15:26:08] zeknox: a1fa: its a model validation so it was validate when the model is being created or updated
[15:26:46] zeknox: a1fa: likely not, what are you trying to do? validate that the form input is completed?
[15:27:27] zeknox: a1fa: that sounds like it should be in the model as a validation, if any validation fails it will not allow a create or update, thats what you want it sounds like
[15:29:21] zeknox: a1fa: i think you might need to call a custom validation that is in a def custom_validator and basically return false if model.locked
[15:53:16] zeknox: a1fa: i think that will work, might need to return false at the end as well
[19:12:33] zeknox: gambl0re: that seems like a matter of opinion
[19:19:36] zeknox: gambl0re: yes I do believe that rails is superior to any php framework personally, has a number of helpers and gems that really assist with the dev process


[15:21:31] zeknox: has joined #RubyOnRails


[01:02:59] zeknox: Quit: Leaving.
[15:50:56] zeknox: has joined #RubyOnRails
[15:51:41] zeknox: are testing controllers necessary if you have request specs which are testing the end user features, and indirectly testing the controllers through form submission and such???
[23:19:23] zeknox: Quit: Leaving.


[14:42:36] zeknox: has joined #RubyOnRails
[15:42:30] zeknox: ivanskie: you should look into ActiveJob to help manage your workers: http://edgeguides.rubyonrails.org/active_job_basics.html


[21:06:00] zeknox: Quit: Leaving.


[14:32:32] zeknox: has joined #RubyOnRails
[14:32:43] zeknox: Client Quit
[14:34:36] zeknox: has joined #RubyOnRails
[14:35:30] zeknox: im leveraging the trumbowyg wysiwig editor, it works great, however css tags like body {font: .7em} inside the editor will override the applications css??? any recomendation on how to prevent this from occuring?
[16:05:09] zeknox: elaptics: true i shouldn't use an inline editor, but thats what im working with. not sure if their is a way to render it in some sort of container so the CSS doesn't override the app CSS, but open to suggestions
[18:06:35] zeknox: im leveraging the trumbowyg gem which is an inline wysiwig editor, it works great, however css tags like body {font: .7em} inside the editor content will override the applications css??? any recommendation on how to prevent this from occurring?
[19:23:39] zeknox: stephen_g: was going to say that sounded weird, if its working in controller properly, it should work in view as well
[19:25:19] zeknox: stephen_g: not sure on the specifics, there is an entire railscast pro video dedicated to this topic: http://railscasts.com/episodes/299-rails-initialization-walkthrough


[20:02:55] zeknox: has joined #RubyOnRails
[20:04:02] zeknox: hey fellas, currently using the trumbowyg wysiwig editor??? all is well except if the user enters some custom CSS in the editor, it will actually override the CSS are part of the rails app. Any suggestion on how I could mitigate the wysiwig CSS overriding my app CSS?
[23:05:01] zeknox: Quit: Leaving.


[02:12:14] zeknox: Quit: Leaving.


[14:26:25] zeknox: has joined #RubyOnRails
[14:52:44] zeknox: pyemkey: have you read the wiki which shows some examples of how to build out those custom routes? https://github.com/plataformatec/devise/wiki/How-To:-Change-the-default-sign_in-and-sign_out-routes


[02:07:14] zeknox: Quit: Leaving.
[13:17:55] zeknox: has joined #RubyOnRails
[18:03:50] zeknox: Quit: Leaving.


[14:42:36] zeknox: has joined #RubyOnRails


[23:56:35] zeknox: Quit: Leaving.


[14:21:55] zeknox: whats thoughts or feedback on the rails-api gem for an API interface?
[14:22:51] zeknox: looking to add an API interface to an existing app and not sure if rails-api is a good fit or not
[14:23:16] zeknox: pontiki: ah good point, any recomendations?
[14:24:11] zeknox: fryguy: yeah that is what I was considering doing, adding a namespace :api in the routes and go from there
[14:25:32] zeknox: is it typical to handle authorization through the url or http headers? or both?
[14:37:32] zeknox: how do most folks handle authorization to the API? via the http headers?
[14:39:06] zeknox: pontiki: and allowing an access_token via the url is not a good practice correct? like no sense in allowing both
[14:40:11] zeknox: pontiki: yeah that is what I was looking to do, allow a devise user object to add an API key and do some sort of authing based on that
[14:40:29] zeknox: pontiki: I agree token in the url is insecure because its being logged in many places including apache logs
[14:40:48] zeknox: pontiki: yes sir
[14:42:51] zeknox: workmad3: in my case its simple, if they have a valid API key they can access the API and pull stats
[14:43:34] zeknox: workmad3: correct in the instance im talking about, the key will act as un and pw
[14:44:08] zeknox: workmad3: would probably require deleting that API key or deleting that user account
[14:44:43] zeknox: workmad3: I was leaning towards authorization header as well, good info tho
[14:46:17] zeknox: workmad3: thats a good callout


[16:59:39] zeknox: mtchllbrrn: http://guides.rubyonrails.org/4_1_release_notes.html#config-secrets-yml
[17:00:43] zeknox: mtchllbrrn: also this: http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml
[17:02:00] zeknox: mtchllbrrn: this too: http://daniel.fone.net.nz/blog/2013/05/20/a-better-way-to-manage-the-rails-secret-token/
[22:33:32] zeknox: how does one typically handle authentication and authorization when exposing an API?


[00:49:39] zeknox: has joined #RubyOnRails
[00:50:25] zeknox: rabl vs jbuilder, is one preffered over another?
[00:51:03] zeknox: bricker: can you give me the 101 on why?
[00:51:39] zeknox: bricker: ty sir, good enough for me!
[00:52:02] zeknox: bricker: im an easy sell because i dont know one over the other


[14:46:40] zeknox: *.net *.split


[15:28:03] zeknox: hey fellas, im running rails 4.2 and running into this issue where i use a select form helper with mutltiple: true and it will always send the first element of the array empty, I've checked out this post here, but even with passing in the option include_hidden true or false there is no change, any ideas? http://stackoverflow.com/questions/8929230/why-is-the-first-element-always-blank-in-my-rails-multi-select-using-an-embedde


[21:33:56] zeknox: ohhmaar: this helps create the actual migration, but ultimately you should double check the migration file in db/* to see the details of what its trying to define for your db schema
[21:34:23] zeknox: ohhmaar: all the migration command does is create a migration file located in db/*
[21:35:25] zeknox: ohhmaar: you probably want to navigate to db/ folder, grab the last migration file you created, delete it and run a new migraiton command properly
[21:35:58] zeknox: ohhmaar: model name should be whatever model your trying to add the attribute to
[21:46:02] zeknox: ohhmaar: because it uses the add_attribute_to_model to auto populate all that stuff for you
[21:46:22] zeknox: ohhmaar: its a rails convention that automatically assumes what attribute and model based on the name
[21:46:42] zeknox: ohhmaar: users is the name of the model
[21:46:56] zeknox: ohhmaar: so that migration is trying to add an address attibute to the user model
[21:50:11] zeknox: ohhmaar: rails g migration add_address_to_patient
[21:51:41] zeknox: ohhmaar: rails g migration add_address_to_patient address:string
[21:53:55] zeknox: ohhmaar: http://edgeguides.rubyonrails.org/active_record_migrations.html