defswork

Activity Graph

Page 1 of 6 | Next »

2018-09-17

[09:15:48] defswork: has joined #RubyOnRails

2017-06-30

[11:07:29] defswork: Ping timeout: 255 seconds

2017-06-20

[12:30:12] defswork: has joined #RubyOnRails

2017-05-02

[07:47:07] defswork: Read error: Connection reset by peer

2017-04-26

[16:42:55] defswork: Ping timeout: 260 seconds
[20:35:11] defswork: has joined #RubyOnRails

2017-04-24

[09:05:41] defswork: has joined #RubyOnRails

2017-04-20

[19:17:34] defswork: Ping timeout: 240 seconds

2017-04-11

[10:08:34] defswork: Remote host closed the connection
[15:41:46] defswork: has joined #RubyOnRails

2017-03-30

[11:51:05] defswork: has joined #RubyOnRails

2017-03-27

[07:48:08] defswork: Read error: Connection reset by peer

2016-07-29

[11:41:07] defswork: has joined #RubyOnRails
[11:55:32] defswork: Ping timeout: 240 seconds
[11:58:43] defswork: has joined #RubyOnRails
[12:04:49] defswork: Ping timeout: 250 seconds

2016-07-28

[09:50:08] defswork: Ping timeout: 265 seconds

2016-07-26

[10:47:07] defswork: sheepman, you mean because it's plain text and contains passwords ?
[10:47:21] defswork: I just chown rails:rails and chmod 640 it
[10:48:08] defswork: my apps runs as rails
[10:48:27] defswork: so its readable to ruby

2016-07-25

[12:29:21] defswork: Remote host closed the connection
[14:09:49] defswork: has joined #RubyOnRails

2016-07-22

[13:38:30] defswork: has joined #RubyOnRails

2015-11-09

[13:33:54] defswork: Remote host closed the connection

2015-10-16

[00:08:51] defswork: has joined #RubyOnRails

2015-10-15

[22:39:06] defswork: Ping timeout: 240 seconds
[22:43:54] defswork: has joined #RubyOnRails

2015-10-14

[16:50:05] defswork: *.net *.split
[17:07:49] defswork: has joined #RubyOnRails

2015-10-10

[21:43:04] defswork: *.net *.split
[21:48:15] defswork: has joined #RubyOnRails

2015-10-07

[19:47:10] defswork: Ping timeout: 240 seconds
[19:48:03] defswork: has joined #RubyOnRails

2015-09-24

[13:15:31] defswork: Ping timeout: 240 seconds
[13:50:34] defswork: has joined #RubyOnRails

2015-09-02

[00:28:00] defswork: Ping timeout: 256 seconds
[00:29:55] defswork: has joined #RubyOnRails
[01:37:08] defswork: Ping timeout: 256 seconds
[01:38:51] defswork: has joined #RubyOnRails

2015-07-30

[21:05:26] defswork: Ping timeout: 250 seconds
[21:06:10] defswork: has joined #RubyOnRails

2015-07-26

[11:05:59] defswork: *.net *.split
[11:11:44] defswork: has joined #RubyOnRails

2015-07-13

[15:36:51] defswork: *.net *.split
[15:37:14] defswork: has joined #RubyOnRails

2015-06-29

[03:32:34] defswork: Ping timeout: 276 seconds
[03:36:13] defswork: has joined #RubyOnRails

2015-06-22

[09:45:52] defswork: has joined #RubyOnRails

2015-06-21

[00:57:01] defswork: Read error: Connection reset by peer

2015-06-19

[12:42:29] defswork: Papierkorb, jabber rocks
[12:43:27] defswork: workmad3, you always call an old friend by the name you've always known them as
[12:47:13] defswork: screen is ubiquitous
[12:47:58] defswork: fluxsource, does more
[12:48:38] defswork: workmad3, no - screen does what it says on the tin
[12:49:04] defswork: workmad3, it's original purpose is still valid - allow you to start interactive processes, detach and resume
[12:49:25] defswork: tmux is being used more for multi-pane windowing etc..
[12:50:28] defswork: screen allowed you to remotely run interactive processes without fear of being disconnected
[12:50:40] defswork: screen must be 20 years old
[12:50:53] defswork: I remember using it on modem connections
[12:51:48] defswork: fluxsource, yeah but screen started out to solve a simple problem - that simple problem still exists and the simplicity of screen still suffices
[12:52:21] defswork: I still use screen and I use tmux for instant environment setup
[12:52:58] defswork: well none are "simple" if you want to do advanced things
[12:53:13] defswork: they are both as complex as vi in keyboard wizardry
[12:53:29] defswork: thats where I fail

2015-06-18

[07:57:12] defswork: so, what a re all the cool kids programming web apps in today ?
[08:12:50] defswork: SteenJobs, would using accepts_nested_attributes_for be a better way to do this ?
[10:56:34] defswork: a redirect is a http thing
[10:56:50] defswork: dont think browsers will accept verbs in http redirect responses
[13:55:57] defswork: Bilbo-baggons, is an assitant trainer an assistant to a single trainer only ?
[13:56:34] defswork: Bilbo-baggons, I'd suggest you have a relationship table
[14:01:15] defswork: Bilbo-baggons, nah
[14:01:33] defswork: I'd be far more generic than that
[14:01:56] defswork: I''d have a relationship types, and relations tables

2015-06-17

[10:37:43] defswork: has joined #RubyOnRails

2015-06-05

[16:19:15] defswork: Remote host closed the connection

2015-05-27

[12:06:03] defswork: apeiros, how often do you start you app ?

2015-05-14

[08:53:04] defswork: can you render a js partial inside another js view ?

2015-03-27

[09:47:30] defswork: how not to do i81n
[09:47:40] defswork: or i18n too
[09:49:00] defswork: if you need entity level i18n put all your variants in a new model - keyed on class,id,column,locale
[09:49:37] defswork: because you might only have en and he but you can almost guarantee that at some point you will need another
[09:50:42] defswork: so adding a new column later for cope with a new company means eventually you could have 100+ columns
[09:52:54] defswork: pcpanic, it really depends on your use and your data
[09:53:27] defswork: I've got a system that requires different language for descriptions etc.. but the models are all locale isolated anyway
[09:54:06] defswork: pcpanic, send is the magic you are looking for

2015-03-17

[16:10:10] defswork: vt102, you can easily emulate rails migrations with plain old sqlscripts

2015-03-04

[13:44:42] defswork: you need multiple invite tokens per user/project
[13:45:57] defswork: depend what the user is accepting
[13:46:08] defswork: if it's initial invite to the application
[13:46:18] defswork: or additional project involvement
[13:46:44] defswork: mauro1254, because the database lets you
[13:47:35] defswork: Im aware of like working on other databases
[13:49:04] defswork: what code are you doing that uses like ?
[13:49:41] defswork: arel's .matches ?
[13:50:07] defswork: you can have alpha bar codes
[13:52:02] defswork: because its not a number
[13:52:20] defswork: its a string containing numerics only
[13:54:26] defswork: mauro1254, also - comparing a 9 character string is going to be no slower than comparing 2 numbers
[13:54:58] defswork: there will be < 10 clock cycles difference per comparison I would venture
[13:56:54] defswork: mauro1254, unless you are working on an embedded system where bytes are critical I wouldnt worry about optimising it down to an integer at this point either way
[13:58:06] defswork: SSE4 does in CPU string comparison
[13:59:04] defswork: http://www.strchr.com/strcmp_and_strlen_using_sse_4.2

2015-01-13

[13:19:22] defswork: mikecmpbll, I'd add a description to that too ;)

2015-01-06

[08:56:25] defswork: whatever happened to Mike Gunderloy ? Disappeared off my radar

2014-11-25

[08:38:59] defswork: Ryan1013, require means they must be present, permit means they are allowed to be mass assigned
[08:39:26] defswork: Ryan1013, so if theres no key of whatever you required an exception is raised
[08:40:29] defswork: http://api.rubyonrails.org/classes/ActionController/Parameters.html#method-i-required

2014-11-24

[11:51:08] defswork: <div class="alert alert-<%= key.to_s == 'notice' ? 'success' : 'danger' %>"><%= value%></div>
[11:51:32] defswork: you arent closing the first div's < either
[15:21:29] defswork: you want fuzzy search ?
[15:23:14] defswork: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/common-options.html#fuzziness

2014-11-17

[08:12:13] defswork: you can manage the onwards connections to mailchimp
[08:12:35] defswork: 1000 users on your web api can be proxied to a maximum of 10 onwards
[08:12:59] defswork: and you can implement local caching too to ease onward burden
[08:15:20] defswork: concurrent means at the same time
[08:16:47] defswork: well thats all there is to know - you can have 10 simultaneous connections active at the same time
[08:19:22] defswork: SteenJobs, in theory yes - but it may well be that they persist your connection state for some time after the last request
[08:20:12] defswork: easily tested though

2014-11-14

[11:40:02] defswork: I'd like some of my helpers to be namespaced - (i.e. called as Something.link_helper) - how can I do this ?

2014-11-13

[09:03:38] defswork: hmm so why would respond_with try to render an update view - shouldnt it be either show or edit ?

2014-11-12

[09:36:55] defswork: rails 4.2 beta - count on rows seems to be doing something odd
[09:37:00] defswork: SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "subscriptions" LIMIT 50 OFFSET 350)
[09:37:27] defswork: it's fetching all rows (or limited to pagination ranges in this case) to then determine the 1st column
[09:37:52] defswork: universa1, kaminari's normal count for pagination stuff
[09:38:32] defswork: that query is determining the 1st column in the table to count by (arbitrary I guess) but to determinie using a wide catching query
[09:39:17] defswork: ACTION wonders if select count(1) from ... works
[09:39:41] defswork: mikecmpbll, is that kaminari or just .count ?
[09:40:38] defswork: yeah it's .page doing it - .count is vanilla
[09:41:45] defswork: ok - if it's a workaround for mysql thats ok - we're deploying to mysql atm
[16:33:14] defswork: when it comes to i18n and labels for data (be it on forms or presentation) should the translations all be within context of the view, or should they user the model attribute name, or should they use a common globally scope key ?
[16:33:46] defswork: I'm just looking for an opinionated direction to follow

2014-11-10

[11:02:10] defswork: is there a way to remove asset request noise from development log ?
[11:03:02] defswork: cool - cheers
[13:05:35] defswork: anyone played with bootcards (bootcards.org) ?

2014-11-06

[09:44:42] defswork: enum does bit masks ? I though it was just symbol to int
[09:45:44] defswork: bitmasks for roles sucks
[09:46:05] defswork: just create a dependent table
[09:46:55] defswork: enum role: [:student, :staff, :admin]
[09:47:49] defswork: wasnt a catch - I was genuine interested in enums working as bitmasks - sad it doesnt now :)
[09:48:06] defswork: though like I said - using bitmasks for stuff like that is a very bad pattern imho
[09:48:14] defswork: we arent bit saving today are we ?
[09:49:11] defswork: first business system i ever programmed on was 23k
[09:49:31] defswork: fixed memory allocated per terminal
[09:49:58] defswork: kids today - don't know they are born etc... :)
[09:50:55] defswork: universa1, variable names could only be [a-z][0-9]
[09:51:04] defswork: two characters max
[09:51:43] defswork: wang basic - you now looking back at it I'm amazed just how much was achieved
[09:52:11] defswork: we had massive system - thousands of programs being chained in/out
[09:52:23] defswork: ACTION is old
[09:53:28] defswork: oh I love C
[09:53:41] defswork: getting close to the metal

2014-11-05

[08:24:32] defswork: I'm trying to use active model functionality in a bare class but also to include dirty support - it's seems to be harder work than I was expecting - should I just inherit from activerecord instead (albeit tableless) ?
[08:26:37] defswork: apparently not - you still need to define attr= and set flags etc..
[08:27:10] defswork: attr_accessor doesnt do engouh
[08:27:24] defswork: I got no code
[08:27:58] defswork: at the moment I'd like dirty and attribute mass assignment etc..
[08:29:21] defswork: dirty tracks changes to state - you can "clean" it and then any subsequent changes are dirty - prior to save
[08:29:45] defswork: gizmore, it's a factory class that creates AR instances
[08:30:39] defswork: I'm not saving - dirty flags in general are not dependent or triggered by save - they occur prior to save
[08:31:25] defswork: I'm not saving
[08:31:38] defswork: because dirty has nothing to do with save
[08:31:50] defswork: things are dirty _before_ save
[08:32:52] defswork: the state is reset after save yes =- but it's also set on instantiation (and the clean/dirty state can be set in code too)
[08:36:53] defswork: create is a result of the action of posting a form - not the url
[08:38:39] defswork: freezevee, I'd have a different controller for admin tasks
[08:39:14] defswork: gizmore, controllers should be representing purpose not models
[08:39:59] defswork: freezevee, DRY is bunkem - as far too much headline
[08:44:56] defswork: freezevee, by default (i.e. you defined the route using resource) the routing maps form POST to create, PATCH to update methods in the controller
[08:45:59] defswork: freezevee, if you want 2 signup options you simply need to create the route for admin_signup and point it to the controller action you desire and use that route helper in the url of the form
[08:47:00] defswork: i.e. admin_signup_path
[08:50:50] defswork: gizmore, this explains dirty without tables/save pretty well - http://api.rubyonrails.org/classes/ActiveModel/Dirty.html - but I'm not keen on defining name= methods for all my attributes - I was hoping that I could use active model's already existing support for that
[09:12:31] defswork: gizmore, we have a api layer that inserts new records with a bunch of lookups to determine associations etc.. (by exterior facing codes) - this factory is to tidy up this api controller and also add some simple caching of the lookups. The idea of using dirty stuff is to determine what association references are different to the previous insert request (the api posts in batches of 1000s) and save re-looking up
[09:15:35] defswork: we post a batch of 1000 CDRs in a single json post
[09:15:44] defswork: and loop through inserting
[09:16:56] defswork: so I create a factory class outside the loop, mass assign from the json post, the factory keeps track of differences between previous and current to save re-looking up the associated ids
[09:17:53] defswork: there are some dependences on the references - for example a different account code means I should relookup cost centres etc.. even if their code is same
[09:18:06] defswork: code is the external reference to these rows
[09:18:42] defswork: the external system refers to an account by "ABC12345" - we look that up against our AR model and get it's ID to complete the association
[09:19:44] defswork: the factory creates the rows - so the controller is simple cdrs.each do |c| factory.get_cdr( c ).save ; end
[09:19:57] defswork: iterating the json
[09:20:21] defswork: (overly simplifying but thats the gist of it)
[09:21:35] defswork: the caching of previous lookup is clearly way too early optimisation and wasn't the reason to factory out this
[09:21:59] defswork: the factorying of it was purely to clean up the controller - it was doing 10-12 lookups to create a new cdr
[09:22:36] defswork: gizmore, doesn't seem to cache anything in this use
[10:38:59] defswork: Rails_noob, you are telling it there must be params[:education] - there isn't
[10:40:45] defswork: so test for the existence of education before building it from the education_params
[10:42:56] defswork: Rails_noob, can you gist the end result html ?
[10:43:55] defswork: Rails_noob, I think you just need the old hidden form field trick that you get with a check_box
[10:44:25] defswork: because no radio button is selected the form doesnt post education_level at all
[10:46:36] defswork: Rails_noob, your form is for @education so the input names will be education_..... - when posted rails unravels it into a hash of hashes params[:education][:level]
[10:46:56] defswork: your form isn't posting education_level because nothing is selected
[10:47:27] defswork: you get this issue with check_boxes but the rails helper auto adds a hidden field so that it is always posted
[10:48:22] defswork: hidden_field
[10:48:31] defswork: called :level also
[10:48:48] defswork: with a value of ""
[10:49:48] defswork: gizmore, probably that level isnt set to a value that there is a radio button value for
[10:49:59] defswork: so no radion button selected by default
[10:50:37] defswork: the excapetion is because :education isnt in params but the validation requires it
[10:50:44] defswork: education isnt being posted
[10:50:50] defswork: because nothing is set in the form
[10:51:01] defswork: so the browser doesnt send it
[10:52:47] defswork: Rails_noob, before your radio buttons add <%= g.hidden_field :level, value: "" %>
[10:54:16] defswork: Rails_noob, personally I'd derive my levels from another table/association
[10:54:46] defswork: you have then hard coded
[10:54:56] defswork: I'd make them table driven
[10:55:17] defswork: want another level ? add a new row - rather than edit all your htmls
[10:58:48] defswork: create an education_levels model/table
[10:59:33] defswork: garndener -> belongs_to :education_level
[11:26:07] defswork: gamzera_, a spam service ?
[11:30:00] defswork: new doesnt return the object

2014-10-23

[14:23:04] defswork: Anyone care to explain the problem with this markup ? https://gist.github.com/defsdoor/03a77c1120c39474df99
[14:23:28] defswork: note the input group btn only sizes correctly when there is content
[14:28:17] defswork: anyone care to look at that gist - I'm baffled
[14:36:19] defswork: elaptics, solved it - missing doctype

2014-10-22

[10:03:11] defswork: me when I change the value in the select box
[10:03:43] defswork: rvanlieshout, adding data: remote to a input is handled by rails' by default
[10:04:07] defswork: its not a custom event that I'm handling - is a stand rails remote link - the rails jquery stuff does it
[10:04:43] defswork: well it certainly forces a select box to fire
[10:05:50] defswork: it doesnt submit the form
[10:06:05] defswork: it triggers the current page url with a param of the select box name/value
[10:06:15] defswork: this is standard rails remote functionality
[10:06:37] defswork: the remote is on the select
[10:06:40] defswork: not on the form
[10:07:07] defswork: remote on a select triggers a get with a param of the select name/value
[10:07:22] defswork: how ? I don't know how - I didn't write the rails jquery stuff
[10:08:00] defswork: I have no custom js
[10:08:10] defswork: adding remote: true triggers a post
[10:08:20] defswork: a GET actually
[10:08:28] defswork: Started GET "/en/admin/accounts?origin=2" for 127.0.0.1 at 2014-10-22 10:58:23 +0100
[10:09:07] defswork: the select doesnt even need to be in a form
[10:09:51] defswork: only when using the same select box id on between pages
[10:10:34] defswork: doesnt have a data-url
[10:12:39] defswork: so wherever jquery gets the current page from is out of date due to turbolinks not being a full page refresh
[10:14:17] defswork: ok - I'll go back to my custom trigger of submit.rails in the meantime and I'll dig later into what is out of date