Page 1 of 1
[16:46:18] arrowcircle: Hi! I have a strang problem with namespacing in rails. https://gist.github.com/arrowcircle/d1ac3bdf78d67703c8e3a3aeca3d22dc If I access my namespaced activemodel, it shows me activerecord model instead. What I doing wrong?
[17:10:31] arrowcircle: matthewd, thanks! I changed all my Pochta models, but ring no bells. Rails s works, but Pochta::Box::News still returns News. I updated the gist https://gist.github.com/arrowcircle/d1ac3bdf78d67703c8e3a3aeca3d22dc
[12:33:43] arrowcircle: hi! I'm trying to make a view for admin interface with structure like https://gist.github.com/cortc/38bc6b6c5be8a23cb9c8 . I need to count number of t.cell method calls. How can I organize list_table method? I dont want from where to start
[12:49:34] arrowcircle: hi! I'm trying to make a view for admin interface with structure like https://gist.github.com/cortc/38bc6b6c5be8a23cb9c8 . I need to count number of t.cell method calls. How can I organize list_table method? I dont want from where to start
[12:55:45] arrowcircle: yes, block as parameter, but how to count cell method calls inside this block? where to store it?
[13:14:33] arrowcircle: hi! my question is not about rails, but could you please advice me any solutions for visits tracking of resources in rails app?
[10:01:29] arrowcircle: hi! I have slow assets precompile on my production serve. It takes 3 minutes to build application.js. On my laptop it gets 10 secs for the same file. What can cause such slow behaviour?
[12:17:52] arrowcircle: hi! I am trying to make redirects from old site and added this part to routes.rb. https://gist.github.com/arrowcircle/f4faf6b78856421c4cc5 How can i refactor it? Should i move it to nginx config? Should i use middleware? Will it slow down routing?
[15:46:05] arrowcircle: hi! i trying to make correct route in for for namespace and scope. https://gist.github.com/arrowcircle/992748814fb84849f641 How should i change my routes or url in form to get it done?
[16:00:44] arrowcircle: rhizome, dont work. if i create event, all is ok, but when i edit i get no route match
[09:10:14] arrowcircle: hi! i want to make an activemodel class, that will save group of items (AR models) and have custom validations. what is the best way to do this? im against initialization of these items and assignment of items params in controller. Any ideas?
[09:13:15] arrowcircle: How to deal with activemodel nested ar models? https://gist.github.com/arrowcircle/bfac5fb01ee6b1776683
[09:18:19] arrowcircle: universa1, i want to assign items to composer in controller like composer.assing_attributes(composer_attributes), but active model dont have this method
[10:08:47] arrowcircle: hi! how to deal with activemodel class with nested activerecord models? https://gist.github.com/arrowcircle/bfac5fb01ee6b1776683 . It works for new items records, how to make it work with existing items?
[12:31:36] arrowcircle: hi! i trying to make images for opengraph and twitter cards with format png. Whats best way to cache them and persist on disk?
[12:34:49] arrowcircle: cryo28, ideally i want to put it in public/uploads and serve as static with nginx, and only generate if missing
[12:35:46] arrowcircle: cryo28, i mean how to configure controller to send file and nginx to serve it if it exists
[12:38:10] arrowcircle: universa1, problem is all uploads are in public/uploads, and url to image is /articles/1.png
[12:39:35] arrowcircle: universa1, cryo28, i want to hit rails and generate it only if image dont exist. if it exist it should be served as static
[12:41:19] arrowcircle: cryo28, universa1, problem is, when i generated image and want to serve it as static, it will be available in public/uplaods folder/, ie as /uploads/articles/1.png, and i want it to be available as static as /articles/1.png
[12:43:40] arrowcircle: cryo28, and if this file is not available, will it hit rails to generate it?
[12:44:38] arrowcircle: JR___, you can move you product code to partial, render partial inside js and put it before other products
[12:48:18] arrowcircle: universa1, problem is its not about only articles, its about all controllers. I should not add all them as shared folders
[12:49:17] arrowcircle: JR___, you can make js-format request via link_to remote: true and response as js code
[13:05:58] arrowcircle: cryo28, actually it should look for all url, because any page have this image
[11:54:03] arrowcircle: hi! i have a complex sql query in my method https://gist.github.com/arrowcircle/3ae43824ba18b88aa2bb . It works good, but it returns array, that have problems with pagination. Kaminary pagination of array works fine, but it loads all results into memory. Is it possible to convert my query to return activerecord relation?
[15:51:02] arrowcircle: hi! i trying to make rails plugin, created it with rails plugin new. added app folder with models and so on. when i run spec i get error about uninitialized constant for my models in app/models. how should i require it to work?
[08:50:47] arrowcircle: hi! what is the best way to upload images for non persisted model? for example, i have comment form, i put some message inside, then drag and drop some images for this comment (with some html5 magic) and click submit? how to make such attachments?
[09:00:19] arrowcircle: hi! i want to make custom form builder to behave like https://gist.github.com/arrowcircle/d25dcf50c8b1ac3eaafc
[09:09:05] arrowcircle: any ideas on how to make custom form builder to work like https://gist.github.com/arrowcircle/d25dcf50c8b1ac3eaafc
[13:29:21] arrowcircle: hi! how can i refactor this view? https://gist.github.com/arrowcircle/7ff2878d896839492eb8
[05:16:12] arrowcircle: hi! i have a strange problem after upgrading sass-rails gem. first it required me to add links to assets inside css files with "depend_on_asset" comment. Now it dont show these assets at all - digest in request and in assets is different. How can i fix this?
[20:02:37] arrowcircle: hi! i have an app, where users upload 10mb files. Some of them are dial up (or slow connection). I use unicorn as app server, but when all workers are busy i have no workers to process requests. How can I solve this situation? WIll it help, if i change my application server (to puma)?
[20:05:45] arrowcircle: Scient, if i need to send_file to clients - its easyly fixed with headers. But users upload files to server
[16:00:37] arrowcircle: hi! i have a controller and action_name, how i can get route to that controller and action (ie "articles#index" goes to "/articles")
[06:37:06] arrowcircle: hi! i have defined helper method in my application controller, but cant access it in the view? what i doing wrong? https://gist.github.com/arrowcircle/7215539
[06:39:34] arrowcircle: ravionrails, already tried this. and tried to move method to public from private
[06:43:02] arrowcircle: sevenseacat, i tried debugger. if i put debugger in controller - i see this method in the inherited controller. but if i put it in the view - its undefined
[06:44:17] arrowcircle: arrowcircle, hm.. if i call seo in the view, it returns nil. i tried call it in debugger - its undefined
[06:46:37] arrowcircle: sevenseacat, NameError Exception: undefined method `seo' for class `Haml::Buffer'
[06:49:42] arrowcircle: ravionrails, method name chage helped. but its wiered why i cant use old name
[06:51:42] arrowcircle: ravionrails, same nil. i searched through code and didnt find any seo method definitions
[14:17:37] arrowcircle: hi! i have helper_method in my application_controller. but when i call it from the view, i get nil always. how can i debug my helper_methoded method?
[14:21:43] arrowcircle: arrowcircle, and if i add logger to seo method in controller - i never see logged message
[11:52:57] arrowcircle: hi! i trying to make a gem, that shares some assets, models, controllers and helpers with rails app. i made dummy app inside my spec/dummy directory. dummy app include behaviour from gem. But when i run spec, it crashes on carrierwave uploader from gem with "not connected to database". How to deal with this?
[19:17:14] arrowcircle: hi! what is the best way to test gem functionality with rspec on live test models? I want to make a tiny rails app with sqlite db and models, that use my gem. What is the best way to integrate it to my gem specs?
[13:49:58] arrowcircle: hi! can anoyone help me with json? I have an API and i send https://gist.github.com/arrowcircle/6390025 request to it. If i read this json from file and put it to post body of request - all is ok. If i read the same string from incoming request - i get JSON::ParserError. Json gisted from logs. How can i fix this?
[13:57:39] arrowcircle: any ideas how to parse escaped json in ruby/rails? I always get JSON::Parser error if have escaped quote inside any parameter
[15:05:55] arrowcircle: hi! i trying to get json from post request body, that is prettified and escaped. how should i modify it to be valid input for JSON.pase?
[15:09:31] arrowcircle: ljarvis, if i put it into jsonlint.org - it seems ok. but when i try to parse it - i get 'JSON::ParserError unexpected token at'
[15:13:32] arrowcircle: i cracked my head trying to gsub it. stack overflow have answers with files - not working for me
[15:26:20] arrowcircle: ljarvis, now i have dispatch params when trying to print params in log "ActionDispatch::ParamsParser::ParseError"
[12:24:27] arrowcircle: hi! i have htm related models. how i can make a search over products for different colors and sizes? all info in gist https://gist.github.com/arrowcircle/5999556
[07:29:48] arrowcircle: hi! what is the easiest way to change value of joining association from one of the parents object in has many through association?
[06:58:08] arrowcircle: hi! i have a problem with rails autoloading "Expected my_model.rb to define MyModel" https://gist.github.com/arrowcircle/5684586 . any ideas how to fix this error?
[10:30:42] arrowcircle: hi! i have a problem with rails autoloading. its "expected my_model.rb to define MyModel". Here is the gist. https://gist.github.com/arrowcircle/5684586 Any ideas how to deal with this?
[10:59:14] arrowcircle: any guru of rails autoload? i have a problem with my models. here is the gist https://gist.github.com/arrowcircle/5684586
[11:02:14] arrowcircle: DouweM, actual error is in the gist. "Expected app/models/redditor/text_block.rb to define TextBlock"
[11:08:36] arrowcircle: here is uodated gist. i have error, when i trying to access it via controller
[12:11:02] arrowcircle: hi! If i have model Redditor::TextBlock, then when i make link_to "", @text_block it will go to "/redditor/text_blocks/1". how i can remove leading "redditor" from url generation?
[12:19:31] arrowcircle: DouweM, sorry for bothering again, but maybe you know how to solve routing problem with namespaced models?
[12:22:14] arrowcircle: DouweM, its more complex. I use poly has_many association, and i use something like "[:admin, p.object, content_block]", where content block connected with p.object and p.object can change its class
[12:22:56] arrowcircle: and for this string [:admin, p.object, content_block] i get admin_redditor_page_redditor_content_block_path(content_block)
[16:08:36] arrowcircle: DouweM, could you please answer another annoying question? can i use STI on input class to connect digital and text inputs to category? https://gist.github.com/arrowcircle/5707191
[16:10:05] arrowcircle: DouweM, ie if i catch category.inputs - it will get me array of digits and texts model objects?
[16:12:11] arrowcircle: DouweM, ok, and what to add to this class structure, to have an ability to add predefined arrays of values? ie introduce new class Input::Predefined, that will have another association with predefined values?
[16:13:14] arrowcircle: also, thats the best way to connect this properties to notice? now i use postgres hstore to store inputs valiues like notice.params[input_id] = value
[16:25:41] arrowcircle: DouweM, and how to deal with jobs, that takes more time, than in timeout? will my deploy take 60 (timeout) seconds longer?
[11:37:17] arrowcircle: hi! In app, that i wiil work, i have an ugly db structure. parameter bt category_value. parameter hm parameter_values, parameter_values are predefined in db and linked with notice(main model) with habtm table notices_parameter_values. here is the gist with full info https://gist.github.com/arrowcircle/5642861 . What is the best way to add ability to add user inputed parameter_values for notices with this ugly structure?
[08:55:00] arrowcircle: rushed, here is the gist of my forms with nested attributes https://gist.github.com/arrowcircle/5539174
[08:59:33] arrowcircle: rushed, in return of this func i want to get something like article[page_attributes][text_blocks_attributes]
[09:19:12] arrowcircle: hi! i have a strange problem with classes and modules https://gist.github.com/arrowcircle/5394525 . when i user rails c and Api::User.register its ok. when i run rspec - i get error in gist. what i doing wrong?
[09:26:51] arrowcircle: sthetz, now it talks about toplevel constant Registration referenced by Api::User::Registration and next line is the same error
[12:15:15] arrowcircle: hi! i have model registration in app/models and i have module Api::User::Registration in app/modes/api/user/registration.rb. when i include registration in Api::User i get include, that i should include module. it seems, that api user includes top model registration instead of api module. how to deal with it?
[12:24:34] arrowcircle: hi! what is a proper way to include api::user::registration to api::user? i have a problem https://gist.github.com/arrowcircle/5394525
[12:33:03] arrowcircle: sthetz, thanks, but how can i define a api user module for registration in separate file?
[13:55:22] arrowcircle: hi! i have strange line in logs in my production app in json response: "Completed 200 OK in 162ms (Views: 1.3ms | ActiveRecord: 18.8ms)"
[14:04:04] arrowcircle: Hates_, its in logs. if AR and view are fast - where i loose in response time?