cnk

Activity Graph

Page 1 of 15 | Next »

2018-11-08

[01:07:21] cnk: has joined #RubyOnRails
[14:02:11] cnk: *.net *.split
[14:06:30] cnk: has joined #RubyOnRails
[19:16:22] cnk: what is the context for `Rake::Task['db:migrate']`? Rake is a command so more normal would be, from the command line: `rake db:migrate`
[19:18:07] cnk: OK good to know
[19:18:17] cnk: and that took care of your runtime error?
[22:34:54] cnk: Quit: cnk

2018-11-02

[18:42:49] cnk: has joined #RubyOnRails
[19:44:48] cnk: Quit: cnk

2018-06-14

[21:55:18] cnk: has joined #RubyOnRails
[21:58:48] cnk: Sorry off topic, but in SCSS, is there a way to convert between a variable name and the value of a variable? I am trying to create a mixin that takes color and writes something like .button-orange {color: ##ff6e1e;} I don't actually care if I pass in $color or the name, but I would love not to have to make the signature of the mixing ('orange', $orange) to get the string and the variable value
[22:05:18] cnk: Quit: cnk
[22:09:01] cnk: has joined #RubyOnRails
[23:23:15] cnk: Quit: cnk

2018-06-05

[16:37:26] cnk: Quit: cnk
[19:03:36] cnk: has joined #RubyOnRails
[20:25:34] cnk: Quit: cnk
[21:45:13] cnk: has joined #RubyOnRails
[23:26:46] cnk: Quit: cnk

2018-05-31

[21:22:11] cnk: has joined #RubyOnRails
[23:47:53] cnk: Quit: cnk

2018-02-24

[00:04:23] cnk: Quit: cnk

2018-02-23

[23:56:12] cnk: has joined #RubyOnRails

2018-02-21

[00:36:42] cnk: Quit: cnk
[00:44:45] cnk: has joined #RubyOnRails
[03:04:58] cnk: Quit: cnk

2018-02-20

[22:17:49] cnk: has joined #RubyOnRails
[22:54:07] cnk: Quit: cnk
[22:56:31] cnk: has joined #RubyOnRails

2018-02-09

[00:10:29] cnk: Quit: cnk

2018-02-08

[00:22:11] cnk: has joined #RubyOnRails

2018-02-07

[02:19:46] cnk: Quit: cnk

2018-02-06

[22:56:31] cnk: has joined #RubyOnRails

2018-01-12

[00:37:02] cnk: has joined #RubyOnRails
[02:06:00] cnk: Quit: cnk

2018-01-10

[02:11:01] cnk: Quit: cnk

2018-01-09

[19:55:20] cnk: has joined #RubyOnRails

2018-01-06

[01:12:09] cnk: Quit: cnk

2018-01-05

[22:02:50] cnk: has joined #RubyOnRails
[23:27:00] cnk: Quit: cnk
[23:31:23] cnk: has joined #RubyOnRails

2018-01-04

[01:30:35] cnk: Quit: cnk

2018-01-03

[02:25:09] cnk: Quit: cnk
[23:27:32] cnk: has joined #RubyOnRails

2018-01-02

[22:44:19] cnk: has joined #RubyOnRails

2017-12-21

[18:41:38] cnk: has joined #RubyOnRails
[20:10:39] cnk: Quit: cnk
[20:12:24] cnk: has joined #RubyOnRails
[22:39:41] cnk: Quit: cnk
[22:43:09] cnk: has joined #RubyOnRails
[23:24:45] cnk: Quit: cnk
[23:33:19] cnk: has joined #RubyOnRails
[23:48:33] cnk: Quit: cnk

2017-12-02

[00:49:54] cnk: Quit: cnk

2017-12-01

[01:23:23] cnk: Quit: cnk
[16:53:04] cnk: has joined #RubyOnRails
[20:05:02] cnk: Quit: cnk
[20:14:11] cnk: has joined #RubyOnRails
[21:25:48] cnk: Quit: cnk
[22:29:39] cnk: has joined #RubyOnRails
[23:25:30] cnk: Quit: cnk
[23:34:15] cnk: has joined #RubyOnRails

2017-11-30

[21:24:15] cnk: has joined #RubyOnRails
[21:24:32] cnk: Client Quit
[21:25:01] cnk: has joined #RubyOnRails
[21:40:57] cnk: So you want to restrict the possible list of C's based on what B has mapped as A?
[21:41:30] cnk: (by the way, it is ALWAYS easier to help if you do NOT obfiscate the domain, real names, not ABC)
[21:44:39] cnk: Hmmm it sounds to me like Answer and ConditionalAnswer should be directly related - not just via Questoin. Is that true?
[21:45:22] cnk: What didn't you like about the original solution? It sounds OK to me
[21:49:24] cnk: Scopes are really just a shorthand for a query so your explicit query method in Question is equivalent and straightforward

2017-11-22

[01:25:52] cnk: Quit: cnk

2017-11-21

[00:54:50] cnk: has joined #RubyOnRails
[02:26:44] cnk: Quit: cnk
[17:41:23] cnk: has joined #RubyOnRails
[18:11:45] cnk: Quit: cnk
[20:01:57] cnk: has joined #RubyOnRails
[21:41:49] cnk: Somewhat - but it might be the practical solution if you just need a little info

2017-11-09

[00:43:11] cnk: Quit: cnk

2017-11-08

[20:10:58] cnk: has joined #RubyOnRails
[21:09:23] cnk: That's sad to hear. I loved capistrano when it first came out. Haven't had occaision to use it recently

2017-11-01

[21:48:24] cnk: has joined #RubyOnRails
[23:19:52] cnk: Quit: cnk

2017-10-21

[00:00:00] cnk: Quit: cnk
[00:01:25] cnk: has joined #RubyOnRails
[00:10:00] cnk: Quit: cnk

2017-10-20

[21:43:19] cnk: has joined #RubyOnRails
[22:33:41] cnk: Quit: cnk
[23:30:09] cnk: has joined #RubyOnRails

2017-10-05

[00:06:30] cnk: I usually like Michael Hartl' stuff https://www.learnenough.com/action-cable-tutorial
[00:15:07] cnk: Quit: cnk

2017-10-04

[00:30:31] cnk: Quit: cnk
[17:15:58] cnk: has joined #RubyOnRails
[17:33:43] cnk: Probably the same way you would unit test any other rails model
[17:34:30] cnk: you might have to do some manual work to fill the underlying tables - if you want to test against data from the db
[20:57:52] cnk: Quit: cnk
[21:15:51] cnk: has joined #RubyOnRails
[22:08:17] cnk: timdotrb: I don't now for certain but update_attributes says it runs callbacks so I would expect reindexing

2017-10-03

[20:53:31] cnk: has joined #RubyOnRails
[22:40:34] cnk: harrycs: In general it is easier and more tasteful to do that sort of thing in a helper method rather than in your view. For something like this I would probably make a method that returns the entire header row - and do the 'if admin' part in that method
[22:44:06] cnk: I have done things both ways so 'it depends'
[22:44:57] cnk: for example, you oculd biuld things up with content_tag or do 2 partials and decide between them in the helper
[22:45:28] cnk: I am slightly in favor of the former for this case
[22:46:31] cnk: whichever way you go, then a similar strategy for building the data rows for that table

2017-09-08

[00:29:22] cnk: Quit: cnk

2017-09-07

[18:19:46] cnk: has joined #RubyOnRails
[19:01:34] cnk: Not to recommend ignoring your data but … postgres storing JSON is pretty flexible
[19:28:23] cnk: zephiro: I suggested Admin.where(email: "miname@gmail.com").domains.where(formation: true)
[19:31:31] cnk: zephiro: Probably need to get down to a single admin (I added .first)
[20:53:31] cnk: funkytwig: Generally I use one master branch and then feature branches for development. Then I use tags to decide if something gets released to production.
[20:54:23] cnk: The driving factor for deciding your git workflow is often something about the tool you are using to do your production releases. So perhaps start there and work backwards towards test and dev?
[20:59:50] cnk: show code
[21:01:36] cnk: funkytwig: on a VPC? or containers or ?
[21:03:15] cnk: ali_g: you have a syntax error ‘class’ not ‘@class’ in your welcome controller
[21:03:31] cnk: but otherwise, I think this should work. What error do you get?
[21:07:36] cnk: OK so that shoulds like a machine (virtual or otherwise). What other tools are in your mix? Do you make production updates manually? to a single server? or multiples?

2017-08-11

[01:25:00] cnk: Quit: cnk

2017-08-10

[19:29:50] cnk: has joined #RubyOnRails
[19:52:11] cnk: ocpysh: This channel is a lot less active than it used to be. But is that a drop off in Rails or IRC use? Or just the intersection of those 2 things? Hard to know
[19:56:50] cnk: Probably. though 2 years ago the Django and RubyOnRails channels had about equal numbers at any one time and roughly similar activity levels. Django is at the about the same size but ROR is 1/2 the logged in people it used to be
[20:07:32] cnk: Quit: cnk
[20:56:17] cnk: has joined #RubyOnRails

2017-08-09

[00:42:13] cnk: has joined #RubyOnRails
[01:32:15] cnk: azlev: do you want to use 2 databases in the same app - or do you want to migrate from MySQL to Postgres?
[01:33:23] cnk: Can you give an example of code that uses a MySQL function? I feel like ‘just replace that bit with the pg equivalent” is missing something or you wouldn’t have asked
[01:36:29] cnk: OK and then you could just order by name without the function, yes? (I don’t do much w ip addresses)
[01:38:16] cnk: Looks like PG has lots of functions for that type - but I am not sure what is closest to INET_ATON https://www.postgresql.org/docs/current/static/functions-net.html
[01:39:16] cnk: I guess my strategy would be 1) review all models for field types and note what needs to change
[01:39:38] cnk: 2) write a data migration (in SQL) that moves the data from MySQL to PG
[01:39:53] cnk: 3) try running your app + tests and see what breaks. Change as needed
[01:40:28] cnk: Not super sophisticated but if the app is small to medium size it could work
[01:47:47] cnk: If you want to support multiple databases you either have to not use any db-specific functions - or you need to wrap them in something that checks the database driver and calls the correct one
[01:51:21] cnk: http://api.rubyonrails.org/classes/ActiveRecord/ConnectionHandling.html#method-i-connection_config
[01:51:43] cnk: the adapter has the db type. There may be other ways to find it
[02:26:18] cnk: Quit: cnk

2017-07-27

[20:52:48] cnk: has joined #RubyOnRails
[20:54:31] cnk: Client Quit

2017-06-28

[16:26:20] cnk: has joined #RubyOnRails
[16:48:02] cnk: Quit: cnk
[16:51:30] cnk: has joined #RubyOnRails
[17:08:34] cnk: Quit: cnk
[17:28:16] cnk: has joined #RubyOnRails
[17:41:47] cnk: Quit: cnk
[18:17:35] cnk: has joined #RubyOnRails
[23:46:12] cnk: Quit: cnk

2017-06-09

[19:23:17] cnk: has joined #RubyOnRails
[19:23:24] cnk: Client Quit

2017-06-07

[20:07:49] cnk: has joined #RubyOnRails
[20:57:58] cnk: Ping timeout: 240 seconds
[21:28:09] cnk: has joined #RubyOnRails
[22:22:51] cnk: Quit: cnk

2017-05-24

[20:49:55] cnk: has joined #RubyOnRails
[21:59:33] cnk: You should not have to do that 3 times - in fact it might get confused if you do
[22:00:12] cnk: do you have ~/.profile and ~/.bash_profile? if so, why?
[22:08:54] cnk: not sure
[22:09:12] cnk: do either have stuff that you did not post and need to keep?
[22:09:30] cnk: and is that file really bash_profile.txt or is it .bash_profile
[22:09:49] cnk: the former probably isn't read but the llater one should be
[22:11:40] cnk: You could put the general methods on a module and include it where you need it
[22:11:59] cnk: or include it in the setup script that governs minitest
[23:27:34] cnk: Quit: cnk

2017-05-23

[16:35:33] cnk: has joined #RubyOnRails
[18:09:40] cnk: has_many
[18:12:16] cnk: because you want ot be able to say avacado.items and get the list of items containing avacados
[18:13:13] cnk: Read this http://guides.rubyonrails.org/association_basics.html or a book chapter on assocations in rails
[18:13:31] cnk: this section may be what you need now http://guides.rubyonrails.org/association_basics.html#choosing-between-has-many-through-and-has-and-belongs-to-many
[18:14:23] cnk: you probably need a mapping table between ingredients and items, so has_and_belongs_to_many
[18:17:07] cnk: myItem.ingredients << fish_stock
[18:17:46] cnk: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_and_belongs_to_many
[22:11:24] cnk: Quit: cnk

2017-05-22

[15:29:04] cnk: has joined #RubyOnRails
[15:29:19] cnk: Client Quit

2017-05-19

[16:38:34] cnk: has joined #RubyOnRails
[21:09:22] cnk: I would guess you would need to requery the changed thing so that rails builds a new object with the new type - but guessing
[21:39:42] cnk: Quit: cnk

2017-05-15

[21:07:23] cnk: has joined #RubyOnRails
[23:27:23] cnk: Quit: cnk

2017-05-12

[20:54:19] cnk: has joined #RubyOnRails
[23:21:59] cnk: Quit: cnk

2017-05-09

[17:29:48] cnk: has joined #RubyOnRails
[17:39:39] cnk: Quit: cnk
[18:14:47] cnk: has joined #RubyOnRails
[18:28:05] cnk: Quit: cnk
[18:30:03] cnk: has joined #RubyOnRails
[18:37:22] cnk: Quit: cnk
[18:38:40] cnk: has joined #RubyOnRails
[19:14:14] cnk: Quit: cnk
[19:15:16] cnk: has joined #RubyOnRails
[19:17:17] cnk: Client Quit
[19:24:11] cnk: has joined #RubyOnRails
[19:32:55] cnk: Quit: cnk
[20:17:05] cnk: has joined #RubyOnRails
[20:23:48] cnk: Ping timeout: 240 seconds
[20:24:40] cnk: has joined #RubyOnRails
[20:24:54] cnk: Client Quit
[20:26:38] cnk: has joined #RubyOnRails
[22:57:42] cnk: Quit: cnk

2017-04-14

[14:51:31] cnk: has joined #RubyOnRails
[16:56:20] cnk: User458764: you might look at https://schneide.wordpress.com/2014/03/10/using-rails-with-a-legacy-database-schema/
[18:32:56] cnk: Ping timeout: 252 seconds

2017-04-07

[17:14:38] cnk: has joined #RubyOnRails
[19:18:24] cnk: Hmmm so how did you install ruby and rails?
[22:34:56] cnk: use SourceTree or git commit -m "your commit message here"
[22:37:06] cnk: Sorry, no idea. I have EDITOR set to emacs -nw
[23:48:10] cnk: Quit: cnk

2017-04-06

[00:02:22] cnk: Quit: cnk

2017-04-05

[17:20:20] cnk: has joined #RubyOnRails
[18:06:08] cnk: 'def self.orginization_id....' is invalid syntax so ya, wouldn't work
[18:06:44] cnk: sunya7a: show your code - the controller where you are updating profile and the Profile model
[18:20:30] cnk: Is that their desktop manager?
[18:48:02] cnk: make yourself a new file
[18:48:17] cnk: What db engine do you want ot use?
[18:48:50] cnk: The easiest way to recreate a database.yml file is to generate a new rails project and copy that one
[18:49:03] cnk: OK I don't think that is the default when generating a new project
[18:49:18] cnk: Right - but it will only have the config files is my bet
[18:50:23] cnk: do `rails --help` and look for a flag to pass to specify the database type
[18:51:24] cnk: Or copy from http://guides.rubyonrails.org/configuring.html#configuring-a-database section 3.15.1
[18:59:56] cnk: Interesting
[19:00:20] cnk: Flipp`-: can you grep the project for any more references to openshift - to get a list of all the files you are missing
[19:00:36] cnk: https://docs.openshift.com/
[19:01:01] cnk: vaguely it's a RedHat container service
[19:01:18] cnk: I have heard of it but don't really know anything about it
[19:01:40] cnk: michael_mbp: https://weworkremotely.com/
[19:03:30] cnk: The job ads I see from StackOverflow look generally reasonable quality - but are almost all Python, not Ruby
[19:03:56] cnk: clearly their algorithm has not figured out that I am on SO because my Python skilz are not as good as my Ruby
[19:05:57] cnk: OK after reading that README, I would suggest using https://github.com/openshift-quickstart/rails4-example/blob/master/.openshift/lib/openshift_secret_generator.rb to get reasonable versions of the files
[19:06:23] cnk: you will want your own secret anyway, but need to know what the file structure should look like
[19:18:27] cnk: whatasunnyday: From a technical standpoint - you just need to read the docs on how to namespace controllers. From a design perspective.... I sometimes do separate controllers by access / role, though I often do that on the same level, both controllers directly in app/controllers, rather than in subdirectories
[19:19:03] cnk: whether to nest largely depends on whether other controllers will also need to differ by role
[19:26:52] cnk: High level, what are you trying to do? e.g. when I edit the user I want X to happen with org ids
[19:29:25] cnk: In ruby you definitely can - but you need to do some reading to see how that plays with Rails autoloading conventions
[19:30:38] cnk: So if the user does not find his org, you create a new organization with whatever he typed?
[19:32:55] cnk: I think that is what is expected from that method - but check the apidocs
[19:42:04] cnk: just call the method that the callback is running
[19:42:23] cnk: e.g. if you have after_save XYZ, just call XYZ
[19:43:21] cnk: I'm not super happy with the organization_id= in Profile, but not my code
[19:43:34] cnk: anyway: lunch!

2017-04-03

[22:12:09] cnk: so in your case, create errors need @user and @address because that is what #new needed
[22:13:09] cnk: is that what you sent to the new controller?
[22:13:35] cnk: I suspect you only had user in the routing
[22:14:06] cnk: what goes in yoru "what goes here" are the routing parameters NOT the instance variables
[22:14:22] cnk: the instance vars are created before you call the render
[22:14:58] cnk: fugee: please restate your question
[22:15:42] cnk: please restate your question with no pronouns
[22:16:53] cnk: fugee: in line 21?
[22:17:39] cnk: I don't think anything goes there
[22:18:09] cnk: I think before line 21, you need to create @user (@address is already there) and then call render
[23:59:03] cnk: Quit: cnk