pavelz

Activity Graph

Page 1 of 2 | Next »

2019-03-12

[14:17:07] pavelz: hi we have a database with somewhat .valid? records. problem is if we want to update some fields and run validations on new data and not old one, is there a way to disable validations for old data and only verifiy what was changed?

2019-03-04

[13:54:47] pavelz: hi I have routing issue
[13:55:46] pavelz: namespace :admin get 'hello/:id' end end -> I don't get hlper admin_hello, just admin. but if I remove the param then it returns to admin_hello_path .
[13:56:33] pavelz: is there a way to parametrarize namespaces get urls to be like /admin/hello/bob ?

2019-02-27

[13:36:24] pavelz: is there a way to -f rake db:migrate:up ?
[13:37:02] pavelz: structure from migration has been wiped and I need to :up data but it just ignores my statements
[13:37:23] pavelz: :down wont work bc there are not columns defined in the migration
[13:38:44] pavelz: does not seem to be so

2019-02-26

[08:39:16] pavelz: hi, I am trying to render partials but vars are not being passed in, how come? other parts of the app do the same and it works ie. render "admin/user/list
[08:39:25] pavelz: ", locked: true
[08:40:01] pavelz: locked in undefined. when I do locals, I get locals_assigns but that seems a bit inelegant
[13:40:34] pavelz: wreird that it didin't work until I have killed spring -9

2019-02-20

[15:26:34] pavelz: anyone had trouble connecting to mysql database?
[15:27:22] pavelz: I installed the server and I can log in with username and password via 'mysql' but rails can't seem to connect

2019-02-06

[07:07:07] pavelz: https://mymodernmet.com/yarn-artist-liisa-hietanen/?fbclid=IwAR0VHhK3s7_0ZSDJMOQfQUjt4Un5bKi08iSDBjrWwBAfHsrN6kbia8wZr78

2019-01-28

[10:39:14] pavelz: is there a way to get ActiveRecord relation on union
[10:39:37] pavelz: like Job.where().union(Job.where()) ?
[10:44:29] pavelz: Job.where("group_id is null").union(Job.where("group_id is not null or in (3,11)))
[10:45:00] pavelz: one gets all null values and other one selects some of the group values
[10:45:06] pavelz: so or can't go in here
[10:45:30] pavelz: oh right i got rid of that group by statement

2019-01-04

[12:48:22] pavelz: I tried using make_resourful but it is way out of date, is there a way to shrink resourceful controllers? example what make_resourceful did: https://github.com/hcatlin/make_resourceful

2019-01-01

[18:43:05] pavelz: has joined #RubyOnRails
[18:43:46] pavelz: heya gang anyone know if there is a gem like was way back make_resourceful ?

2018-12-26

[17:50:02] pavelz: Quit: brb

2018-12-17

[04:10:21] pavelz: Quit: leaving
[04:25:01] pavelz: has joined #ruby
[19:10:57] pavelz: Quit: leaving
[19:13:38] pavelz: has joined #ruby

2018-12-06

[23:12:05] pavelz: has joined #ruby
[23:12:38] pavelz: i am trying to rename keys in array of hashes but it just ignores them
[23:13:14] pavelz: arr.each{|n| n.each{|k,v| f = k.gsub(/node_/,''); puts f," ", v; [f, v]}.to_h }
[23:14:35] pavelz: is my code wrong?
[23:15:18] pavelz: [{"node_name" => "hello"},{"node_name" => "where"}]
[23:22:15] pavelz: havenwood: haha no its not. but thanks!
[23:22:26] pavelz: havenwood: what version?
[23:23:17] pavelz: 2.2.3 here
[23:55:48] pavelz: havenwood: thanks

2018-11-25

[12:43:11] pavelz: has joined #RubyOnRails

2018-11-24

[15:53:09] pavelz: Quit: poof
[16:20:20] pavelz: has joined #ruby
[16:28:54] pavelz: Quit: leaving

2018-11-23

[12:15:11] pavelz: hi anyone done nested forms? i have a form and I get only one of the nested records be passing in on a new page
[12:15:37] pavelz: i ause f.simple_fields_for and everything is ok but I last objectg clobbers all previous ones
[12:26:16] pavelz: as i remember there are suppose to be [] at the end that form builder is not addding
[12:54:22] pavelz: https://gist.github.com/pavelz/68a473dbcb335361b556ba9098e7be3c
[12:55:12] pavelz: using knockout to load multiple objects from app and the form_fields get duplicated but there is no [] added to the end and I get single nested object
[12:55:21] pavelz: tbuehlmann: ^
[12:55:44] pavelz: code works but if I load 3 objects it passes only one, last one
[12:57:06] pavelz: i feel so dumb because it works but only half way
[12:59:54] pavelz: if I add hidden_field_tag I get csrf token violationm
[13:07:42] pavelz: so I replaced form with simple form
[13:07:49] pavelz: er simpe with regular
[13:08:34] pavelz: how would one go about creating a nested new form with multiple items to be loaded into association when object is created, how do you strucuture this form?
[13:13:19] pavelz: heh i don't need links i need to drop objects in from other place into the form, can I replicate it ?
[13:31:17] pavelz: well csrf will not let me thru
[13:32:20] pavelz: i tried using raw input tags and it didn't work
[13:40:24] pavelz: looks like i have to mangle JS
[13:40:33] pavelz: names of the forms elements
[13:41:15] pavelz: actully not as bad
[13:41:43] pavelz: yeah I have to add [0] or [n] to get multiple objects.between node and node_id
[13:41:48] pavelz: array notation
[13:42:52] pavelz: i still don't get an array
[13:43:59] pavelz: how can I get an array>
[13:44:44] pavelz: now it works
[13:53:21] pavelz: one more thing
[13:53:45] pavelz: if association belongs_to is polymorphic does it matter?
[13:54:04] pavelz: not getting inserts on them fields :)
[13:54:57] pavelz: accept_nested is there but it just ignores the hash
[14:06:50] pavelz: oh naming _attributes :)
[14:15:12] pavelz: thx tbuehlmann

2018-11-14

[16:38:41] pavelz: anyone knows about turbolinks? i had to upgradet to versions 5 and now when going over to older pages I get servied a cached version and a few seconds later it refreshes
[16:38:56] pavelz: can't seen to enalbe progress bar either
[20:48:07] pavelz: hello, I am using bundler but I need to install some gems by hand but bundler still tries install gems that I have installed and fails
[20:48:23] pavelz: how can i make sure bundler does not do that
[20:50:01] pavelz: specifically libv8

2018-11-12

[11:18:11] pavelz: has joined #RubyOnRails
[11:18:45] pavelz: hello, anyone knows what is the difference between coffee-script-source 1.10 and 1.12
[11:19:31] pavelz: when I upgrade turbolinks, that gem is also upgraded and I get execJS errors on image_tag and other parts of templates

2018-10-22

[10:51:48] pavelz: has joined #ruby
[10:51:57] pavelz: hi anyone good and strong with rspec here?
[10:52:26] pavelz: i tried putting definition of double objects in before block but there is an error
[10:52:46] pavelz: says I can't rspec-mock outside of exmaples
[10:53:01] pavelz: so q is where can I put repetitive blocks of mocks?
[10:54:32] pavelz: ah ok thaks!
[11:09:41] pavelz: it seems to work if I do allow in let block what is the second part?
[11:10:20] pavelz: describe is for describleing blah class?
[11:17:37] pavelz: that cleared it up 100% thanks!

2018-09-10

[11:55:54] pavelz: has joined #RubyOnRails
[11:56:36] pavelz: hi guys , wonder how can I find where a method defined in a class, because it is defined but it is not defined in the controller files
[12:37:30] pavelz: can there be a round and no method at the end I wonder
[12:50:48] pavelz: i guess there is n't
[18:37:16] pavelz: Ping timeout: 272 seconds

2018-08-21

[15:45:23] pavelz: Ping timeout: 256 seconds

2018-08-17

[11:28:14] pavelz: has joined #RubyOnRails
[11:29:27] pavelz: in 4.2 version of an app there are param elements that get nil passed to them while in 5.2 they are passed as actual empty arrays
[11:29:31] pavelz: is this right?
[12:06:54] pavelz: deep_munge has changed

2018-08-16

[07:16:55] pavelz: Quit: leaving
[07:26:18] pavelz: has joined #ruby

2018-07-20

[00:07:19] pavelz: *.net *.split
[00:15:26] pavelz: has joined #RubyOnRails

2018-07-16

[16:33:29] pavelz: hi if i do ActiveRecord::Relation instance.to_sql I should get an sql query?
[16:33:47] pavelz: and not an empty line ?

2018-07-11

[16:40:28] pavelz: has joined #RubyOnRails
[16:41:06] pavelz: hey, how come now User.none returns [] instead of relation ?
[16:55:32] pavelz: no representation changed. grr
[16:55:51] pavelz: gives [] bit .class gives activrecrod

2018-07-07

[16:22:44] pavelz: Remote host closed the connection

2018-06-21

[11:23:20] pavelz: why i get name error for modules that suppose to be loaded from lib ?
[11:23:42] pavelz: if I copy modules to app/lib , they are discovered naturally
[13:17:48] pavelz: why is tha when I move module to app/lib it starts to resolve and not throw NameError ?
[13:23:19] pavelz: lib is not ? has it changed from 4.2?
[13:24:14] pavelz: but would this enable that? : config.autoload_paths << Rails.root.join('lib')
[13:44:45] pavelz: nzst: thanks thats informational.

2018-06-20

[10:36:58] pavelz: i am looking at old branch and wonder why I moved lib to app
[10:37:21] pavelz: for upgrades was there any reason to move lib to app ?
[10:37:42] pavelz: my require didn't seem to find files

2018-06-14

[11:21:34] pavelz: has joined #RubyOnRails
[11:23:06] pavelz: wonder why would .where would accept some children and not the others. like Node.where(File.all) but not Node.where(Folder.all) both are children of Node.
[13:48:43] pavelz: why I can pass ActiveRecord::Relation into where in 4.2 and not in 5.2
[14:07:19] pavelz: sevenseacat: i think I see it. trying to replace any_of since it is not supported in rails 5.2

2018-06-12

[11:16:16] pavelz: Quit: leaving

2018-06-08

[10:48:54] pavelz: I have a q: ExecJS error: ActionView::Template::Error (SyntaxError: [stdin]:387:28: unexpected =): what does it mean ?
[10:52:30] pavelz: there is no file specified with the error
[10:52:52] pavelz: i wonder how can I turn that on, reporting filename
[11:12:02] pavelz: tbuehlmann: yeah it took sometime but it worked thanks! :0
[13:26:07] pavelz: Ive delete Gemfile.lock and upped version of rails to 5.2 and getting all these errors about not beeing abke to find compatible vrsion or activerecord
[13:26:37] pavelz: coworked genned Gemfile.lock and it works for some reason
[13:26:49] pavelz: i feel now dumb
[13:31:20] pavelz: so they updates gems about which there were no errors of

2018-06-07

[13:03:45] pavelz: has joined #RubyOnRails
[13:04:16] pavelz: hi folks just wonder if anyone seen: SyntaxError: [stdin]:387:28: unexpected = in all .erb files. Happened after upgrade from 4.2 to 5.2
[13:04:26] pavelz: <%= %> stopped working
[14:08:40] pavelz: ah its ExecJS throwing an error
[14:09:08] pavelz: really dumbfounded how to fix such an oblique error
[14:19:39] pavelz: is there a way to find on with what file is ExecJS is having a problem with ?

2018-06-04

[09:19:59] pavelz: has joined #ruby
[09:32:44] pavelz: Quit: Page closed

2018-06-02

[11:42:59] pavelz: Ping timeout: 256 seconds
[11:50:21] pavelz: has joined #ruby
[12:48:43] pavelz: Ping timeout: 256 seconds
[12:48:57] pavelz: has joined #ruby

2018-05-29

[02:47:09] pavelz: *.net *.split
[02:47:45] pavelz: has joined #RubyOnRails
[02:47:57] pavelz: has joined #ruby

2018-05-27

[22:41:44] pavelz: has joined #ruby
[22:41:50] pavelz: has joined #RubyOnRails
[22:43:09] pavelz: hello, I want to connect to an extrnal service but with persistent websocket from workers in a rails apo. need to stream changes, is there a general pattern or a gem to keep a websocket connection ?
[22:44:22] pavelz: wait it is to *serve* data over ws
[22:44:30] pavelz: not consume or am I wrong.
[22:47:15] pavelz: damn the site is down. found the gem thanks!@
[22:54:22] pavelz: hah it still adverses providing pub for the sub.
[22:59:26] pavelz: odd. had to get off vpn to get it to work. thanks!

2018-04-18

[16:14:40] pavelz: Quit: leaving
[16:26:12] pavelz: has joined #RubyOnRails
[23:19:43] pavelz: Ping timeout: 246 seconds

2018-04-17

[13:18:51] pavelz: hi, I have a controller namespaced in admin (and so are the routes) just wondering if there is a general way to integrate this with non-namespaced models?
[13:19:51] pavelz: so i do form_form DataItem.new from namespaced controller and I get error that there is no new_data_item_url helper
[13:24:10] pavelz: tbuehlmann: this is thanks!
[13:29:19] pavelz: tbuehlmann: nuh, can't place edit/new code in _form then

2018-04-16

[11:41:36] pavelz: accessing Models from controllers wrapped in a module seems problematic
[11:56:58] pavelz: or that typing more attentively helps

2018-04-06

[10:03:28] pavelz: hi i wonder if I can move csrf token check to be performed after validation of a logged in user
[10:36:45] pavelz: dminuoso: thanks.
[12:04:39] pavelz: dminuoso: unfortunately i have rails 4.2
[12:04:49] pavelz: says feature available since 5

2018-03-28

[07:16:53] pavelz: has joined #RubyOnRails
[07:17:43] pavelz: i wonder where can I get .to_xml functionality ? AR objects do not seem to have it and respond_to just wraps pointers to objects.
[07:18:14] pavelz: to rephrase. i want to_json but for to_xml
[07:24:03] pavelz: activejob or via a hook?
[07:26:06] pavelz: hah tru dat
[07:31:30] pavelz: havenwood: already installed thx!

2018-03-27

[08:43:50] pavelz: Quit: leaving

2018-03-26

[14:03:06] pavelz: has joined #ruby

2018-03-23

[06:44:21] pavelz: has joined #ruby
[07:22:09] pavelz: has joined #ruby
[07:22:09] pavelz: Changing host
[09:39:08] pavelz: Ping timeout: 276 seconds
[09:48:14] pavelz: has joined #ruby
[10:25:56] pavelz: Ping timeout: 276 seconds

2018-03-22

[10:14:35] pavelz: has joined #RubyOnRails
[10:15:25] pavelz: hi i have a q: what is a helper -> users_path(id) vs user_path(id) latter is show, which is former ?
[10:23:29] pavelz: oh right format. bleh
[12:20:27] pavelz: Ping timeout: 240 seconds
[13:31:26] pavelz: has joined #ruby
[13:31:54] pavelz: has joined #ruby
[13:31:54] pavelz: Changing host
[13:31:58] pavelz: has joined #RubyOnRails
[15:14:45] pavelz: Ping timeout: 264 seconds
[15:55:00] pavelz: has joined #ruby
[15:55:05] pavelz: has joined #ruby
[15:55:05] pavelz: Changing host
[15:55:07] pavelz: has joined #RubyOnRails
[17:00:27] pavelz: Ping timeout: 240 seconds
[17:26:27] pavelz: has joined #ruby
[17:33:35] pavelz: Ping timeout: 240 seconds
[18:28:19] pavelz: has joined #ruby
[19:46:05] pavelz: Ping timeout: 240 seconds

2018-03-18

[15:53:09] pavelz: has joined #ruby
[17:24:57] pavelz: Ping timeout: 240 seconds

2018-03-14

[18:54:31] pavelz: has joined #ruby
[20:02:36] pavelz: Quit: leaving

2018-03-13

[10:12:35] pavelz: Quit: i must go

2018-02-19

[12:26:03] pavelz: how do I rails g migration if migrations are in a separate gem ... ?
[12:33:10] pavelz: nm found it

2018-01-15

[13:56:29] pavelz: is there somewhere where one can disable sql logging
[13:58:50] pavelz: well sql logs are gone but logger is not being disable anywhere
[13:59:56] pavelz: no, to enable it, I don't see anywhere it was disabled
[14:11:01] pavelz: there a logger tied to ActiveRecord::Base.logger i guess i can investigte it

2018-01-07

[10:04:14] pavelz: hi i have a q, on front page I want to serve json along side html, i have respond_to but when I send content-type as application/json it does not respond with json
[10:12:28] pavelz: nm solved

2017-12-27

[23:32:08] pavelz: hi. i have a q, in engine.rb part of gem there is config.paths['app/models'] << 'lib/models' / does this updates paths so BY-convention rails will search in gem/lib/models too for model descriptions or what is the meaning?
[23:32:35] pavelz: this is rails engines question / rails paths config i guess.

2017-12-21

[15:23:39] pavelz: reopening classes