Activity Graph

Page 1 of 3 | Next »


[16:19:59] ciree: has joined #RubyOnRails
[16:21:13] ciree: any opinions on on cities gem vs city-state gem?
[16:28:07] ciree: Quit: Lost terminal


[17:59:52] ciree: Ping timeout: 264 seconds


[20:12:23] ciree: can I have a model without a primary key?
[20:12:35] ciree: for things like join tables, or has_one relationships
[20:14:15] ciree: but im explicitly in my migration
[20:14:17] ciree: saying no
[20:14:26] ciree: is there any reason this is a bad idea?
[20:16:51] ciree: tubbo:
[20:19:03] ciree: tubbo: im on rails 3
[20:19:29] ciree: the site_data, I guess technically the site_uuid would be the primary key?
[20:19:35] ciree: even though its the foreign key


[20:48:05] ciree: alaing: what do you want the result to be?
[20:48:23] ciree: alaing: that will work
[20:49:00] ciree: u want, all the values from checkVisible.uniq, to be in actual_result?
[20:52:24] ciree:


[19:25:43] ciree: *.net *.split
[19:31:32] ciree: has joined #RubyOnRails


[17:35:04] ciree: siaw: remove your credentials..
[17:35:44] ciree: siaw: once you get the auth token
[17:35:49] ciree: now you include it in future requests
[17:36:10] ciree: so https://the.domain/api/v1/endpoint?access_token=${access_token}
[17:36:21] ciree:
[17:36:26] ciree: they have examples there
[17:36:37] ciree: faraday is what you should continue using
[17:39:49] ciree: Faraday.get('', {access_token: my_access_token})


[09:52:51] ciree: *.net *.split
[09:53:08] ciree: has joined #RubyOnRails
[10:03:47] ciree: *.net *.split
[10:04:00] ciree: has joined #RubyOnRails


[12:25:19] ciree: *.net *.split
[12:29:15] ciree: has joined #RubyOnRails


[22:07:45] ciree: can I create an initializer for a local library in lib?


[13:56:04] ciree: *.net *.split


[06:02:51] ciree: vedu: clear your database?
[06:03:27] ciree: is the column an integer column?


[17:08:19] ciree: rspec, whats the syntax for expect(myHash).to include(:a, :b, c: {:d})
[17:08:45] ciree: I just want to assert the keys are there, but also some of the keys might be a hash that I want to assert their keys


[22:06:23] ciree: can I have two has_many's with the same name?
[22:06:27] ciree: one has a through the other doesnt
[22:08:32] ciree: any thoughts on how I could accomplish this?
[22:08:43] ciree: basically, the intermidate model doesn't need to exist anymore
[22:08:55] ciree: but I'd like the migration to the new code to still work
[22:10:14] ciree:
[22:10:27] ciree: basically, the model stuff doesn't need to exist anymore, and is just legacy
[22:11:00] ciree: but while making the transition to the new way, I'd like the old way to still work
[22:15:50] ciree: I'll figure it out, thanks


[18:59:16] ciree: how do you handle complex redirect logic?
[18:59:21] ciree: just a huge if?
[19:10:16] ciree: well right, but within that method
[19:10:19] ciree: is a huge if
[19:12:21] ciree: makes sense


[17:16:40] ciree: pretty sure its still free?
[17:16:48] ciree: the web version
[17:16:58] ciree: the main thing is to just build stuff
[17:17:45] ciree: docs are pretty good in general
[17:18:00] ciree: decide what you wanna do and just make it happen
[22:26:41] ciree: id like the answer to that question for rails 3 please


[20:35:22] ciree: check out roar though


[22:51:19] ciree: different webservers handle it differently, but for the most part
[22:51:28] ciree: it blocks a single web request
[22:51:37] ciree: 1 request = 1 thread
[22:51:42] ciree: for the most part
[22:52:17] ciree: ruby can do concurrency, not parallelism
[22:52:24] ciree: well, I think you can in different runtimes
[22:52:36] ciree: I take it you are familiar with promises?
[22:52:52] ciree: you might enjoy
[22:56:14] ciree: hhgridd: Probably, think about it this way
[22:56:20] ciree: Rails will make you fast to getting it out the door
[22:56:32] ciree: if rails starts to be the bottle neck, thats a great thing ;)
[22:56:48] ciree: then you can start stripping things out and maybe going to node/whatever
[22:56:57] ciree: Even then, dont worry about it till its an issue
[22:58:45] ciree: There are faster things than rails, lets leave it at that
[22:59:22] ciree: hhgridd: you can't go wrong with that approach, we use that at work
[22:59:45] ciree: also take a look at roar
[23:00:00] ciree: makes defining your json responses clean
[23:00:17] ciree: To be honest, I don't really see a point of using grape
[23:00:33] ciree: You could just use rails controllers and road
[23:00:50] ciree: unless I'm missing something...


[19:35:54] ciree: *.net *.split
[19:35:56] ciree: has joined #RubyOnRails


[20:59:04] ciree: jmarchello: Thats an option, but you can also have your API calls do the mapping of the parameters
[20:59:48] ciree: fetch('/my/rails/api').then((res) => res.json()).then(json => /* do logic to format it nice for my models*/)
[20:59:59] ciree: try not to over think it
[21:00:34] ciree: its really your call, since you said model you probably need static typing
[21:00:38] ciree: is it a native app?
[21:00:49] ciree: android, ios?
[21:01:27] ciree: not to familar with the ecosystem there, but dont over think it
[21:01:56] ciree: say your, email, integer, otherthing)
[21:02:01] ciree: then just pick those out of the response
[21:02:18] ciree: that was javascript, sorry lol
[21:02:22] ciree: basically
[21:02:32] ciree: data = makeApiCallFunction()
[21:02:43] ciree: then pick out the keys you want


[16:13:11] ciree: has joined #RubyOnRails
[16:13:43] ciree: anyway to destructure a model?
[16:13:57] ciree: email, username = User.find(1) ?


[17:47:34] ciree: anyone at ruby conf?


[02:37:03] ciree: *.net *.split
[02:44:22] ciree: has joined #RubyOnRails
[02:44:23] ciree: Ping timeout: 264 seconds
[04:40:17] ciree: has joined #RubyOnRails


[00:16:12] ciree: has joined #RubyOnRails


[21:31:06] ciree: ModusPwnens: concerns/mixins or a base class
[21:31:38] ciree: ModusPwnens: thats really up to you,
[21:34:31] ciree: ModusPwnens: Yeah I don't see why not
[21:34:43] ciree: the place I work at is a rails shop and does that
[21:35:13] ciree: ModusPwnens: for 'abstract' you could have something like this
[21:35:15] ciree: def message; raise NotImplementedError; end
[21:35:26] ciree: not perfect, but same idea


[15:33:04] ciree: has joined #RubyOnRails


[21:10:23] ciree: how can i have strong parameters specific to certain actions?
[21:10:29] ciree: i dont want all my actions to have the same strong parameters
[21:12:03] ciree: define private methods that are the permitted


[19:49:23] ciree: how do I compile sass files programatically?
[19:49:34] ciree: Sass::SyntaxError: File to import not found or unreadable: ./globals/all


[04:02:56] ciree: Ping timeout: 250 seconds
[04:05:57] ciree: has joined #RubyOnRails


[01:43:36] ciree: Ping timeout: 256 seconds
[03:39:42] ciree: has joined #RubyOnRails


[23:34:28] ciree: bundle exec rake db:migrate


[00:36:00] ciree: *.net *.split
[00:40:46] ciree: has joined #RubyOnRails


[10:31:03] ciree: *.net *.split
[10:32:16] ciree: has joined #RubyOnRails


[22:35:01] ciree: *.net *.split
[23:24:18] ciree: has joined #RubyOnRails


[00:37:29] ciree: any reason why my url helpers would use a . instead of a / ?
[00:37:44] ciree: customers_url(customer) returns /customers.34 for example
[14:46:17] ciree: has joined #RubyOnRails
[14:51:49] ciree: has joined #RubyOnRails
[18:44:17] ciree: anyway to get index using enumerable find? like I'd like to have that passed into the block
[18:44:26] ciree: or another way to solve my problem
[18:48:12] ciree: arup_r: thanks!
[23:19:09] ciree: ops = target


[21:42:40] ciree: has joined #RubyOnRails



[02:34:44] ciree: Ping timeout: 250 seconds
[02:40:30] ciree: has joined #RubyOnRails


[23:06:42] ciree: describe the issue
[23:09:46] ciree: require 'devise/mailer
[23:10:50] ciree: j0sephandres: sounds like turbolinks


[18:42:07] ciree:
[18:42:15] ciree: is doing something like that okay?
[18:58:47] ciree: elaptics: its a rails model
[18:58:57] ciree: so im basically dynamically including
[18:59:13] ciree: can you include like that after a class is initialized?
[21:14:58] ciree: how can I do an include
[21:15:04] ciree: for invividual instances
[21:15:14] ciree: so when I create instance of a class
[21:15:21] ciree: each instance uses a different include
[21:16:19] ciree: can I just call extend within the initialize func?


[19:54:34] ciree: my rails app
[19:54:38] ciree: renders a spa
[19:54:45] ciree: I want to append a hash fragment to the end of the url
[19:54:47] ciree: in the controller
[19:56:48] ciree: not sure how posting code would help
[19:57:24] ciree: so page is /stuff/things, and I want the return to be /stuff/things#spa
[20:01:44] ciree: that will rerun my controller action logic though no?


[00:57:17] ciree: Ping timeout: 244 seconds
[01:03:16] ciree: has joined #RubyOnRails
[15:51:15] ciree: August 13th, 2015
[15:51:17] ciree: how do I get that date?
[15:51:31] ciree: can't figure out the 13th part
[15:51:38] ciree: strftime doesnt do that
[15:53:56] ciree: .to_formatted_s(:long_ordinal)
[15:53:59] ciree: was the answer
[17:37:46] ciree: do configs get localized in rails?
[17:37:58] ciree: say i have config/thing.yml
[17:38:09] ciree: will config/thing.GB.yml be loaded with gb locale?


[00:00:10] ciree: maybe look into rack?
[00:04:40] ciree: basically, you only wants your controllers to do fetching
[00:04:52] ciree: and they provide what you'll actually be using in the view
[00:05:07] ciree: your models provide the fetching logic, and transformations
[00:07:01] ciree: i dont think so?
[00:07:02] ciree: more like
[00:07:14] ciree: hitting /users/1 gives you a user with id of one
[00:07:19] ciree: so in your controller
[00:07:28] ciree: all you need is User.find(params[:id])
[00:07:42] ciree: notice how the user model provides a way to fetch that user
[00:07:46] ciree: your controller only calls that
[00:07:53] ciree: and makes it available to the view
[17:30:58] ciree: anyway to to pass instance variables after redirect?


[23:57:59] ciree: its text bro
[23:58:30] ciree: give a specific example


[16:45:14] ciree: rvm still works fine, some prefer rbenv
[16:52:09] ciree: oleksandriuzikov: I am using rvm with 2.2.2 right now


[22:26:22] ciree: like..full text search?
[22:52:09] ciree: ModusPwnens: you know javascript?
[22:54:53] ciree:
[22:57:06] ciree: You definitely can, I just don't bother with that sort of thing
[22:57:47] ciree: i just like javascript, and I always fuck up the path helpers and what not


[18:36:38] ciree: we use 3.8, using ruby 2.2.2


[16:36:08] ciree: any rails gems to generate an ERD?
[16:50:12] ciree: pipework: yeah, thought maybe someone had an opinion/preference


[16:57:08] ciree: shathoma: rails will know
[16:57:25] ciree: as long as you go by the conventions
[16:58:21] ciree: which is the default


[11:05:58] ciree: *.net *.split
[11:12:40] ciree: has joined #RubyOnRails


[19:15:01] ciree: kinduff: add a validates uniqueness
[19:15:31] ciree: validates :slug, uniqueness: true
[19:15:46] ciree: kinduff: you can also do a database level constraint
[19:20:53] ciree: kinduff: I think so


[17:56:57] ciree:
[17:57:22] ciree: theres also like... Model.column_names
[17:57:40] ciree: Model.columns


[16:21:26] ciree: rubyonrailed: that works, or you can simply do server side validation and then display errors
[18:20:15] ciree: is there a way to figure out which layout rails is using? I can't figure out what the default is
[18:31:30] ciree: smathy: thanks!
[18:37:06] ciree: smathy: that worked great but is there a general default? Like should I have assumed that if there wasn't an explicit layout that it would have been application.html.erb?
[18:40:07] ciree: smathy: thanks!
[23:18:47] ciree: they definitely do evaluate js
[23:18:59] ciree: i mean there are different kinds of spam runners, but they can js


[14:42:11] ciree: Ping timeout: 248 seconds
[22:01:25] ciree: has joined #RubyOnRails


[21:13:54] ciree: Elion: scroll down


[19:57:56] ciree: has joined #RubyOnRails
[20:06:29] ciree: putting software engineer is an easy 5k extra in salary


[18:01:14] ciree: has left #RubyOnRails: ("WeeChat 0.4.2")


[22:47:57] ciree: so you need to take a look at the google maps api reference
[22:48:03] ciree: and figure out how to get the information from the map
[22:48:10] ciree: then submit that data to your server
[22:48:32] ciree: always :)