ss942

Activity Graph

Page 1 of 1

2019-08-12

[15:18:46] ss942: has joined #RubyOnRails
[15:25:25] ss942: I have no idea what I'm missing, could anyone tell me what should I do?
[15:25:25] ss942: Now it makes me crazy because I'm getting 2 different data structures in same request. Somehow I've when I click again in another link the thing I wanted to replace previous value coexist with old one.
[15:25:25] ss942: ...params.merge act in way I don't understand. Previously when I merged something like params.merge(accordion: {sort: {opportunity: (sort != ('n' || sort == 'n-') ? 'n' : 'n-')}}) it worked.
[15:25:25] ss942: Hello, I'm trying to pass multiple parameters inside link_to I made same thing copule months ago, and everything was working. I nearly copy pasted my previous code, to next place, and...
[15:38:01] ss942: nah, it's not alway's one of these, somtimes it's 'c' or 'c-' etc.
[15:38:01] ss942: (17:36:20) havenwood: ss942: This will always result in `"n"`, always: ('n' || sort == 'n-')
[15:38:28] ss942: I fu&&& brackets xD
[15:43:43] ss942: havenwood: oh my god you were totally right
[15:43:53] ss942: I have to take some sleep
[15:44:45] ss942: I can't say how it's possible that I hadn't noticed this
[15:45:07] ss942: Maybe I should try out some books about clean code =|
[19:21:50] ss942: > 26 files changed, 575 insertions(+), 189 deletions(-)
[19:22:09] ss942: wrong channel
[19:39:07] ss942: has left #RubyOnRails: ()

2019-05-08

[11:41:51] ss942: has joined #RubyOnRails
[11:48:29] ss942: Does Rails or any of it's gems have a way to do it like that?
[11:48:29] ss942: I'm looking for a way to write string in a way that html.erb files are (somthing like: x="<%= label ... %>".to_erb_html)
[11:48:29] ss942: The only problem I have is with that "I can't imagine that there's impossible to do it in Rails that way"
[11:48:29] ss942: Hello, I'm writing helper, which task is to render label + input for multiple "custom fields" based on it's "custom field type"
[13:28:02] ss942: tbuehlmann: are you still here? I had unexpected meeting, and cannot say thank you when after your answer I found solution.
[13:28:03] ss942: So I'm telling it now, thank you !
[17:46:22] ss942: Quit: Leaving.

2019-04-24

[09:45:20] ss942: Quit: Leaving.
[09:45:52] ss942: has joined #RubyOnRails
[11:33:14] ss942: has left #RubyOnRails: ()

2019-04-23

[11:58:26] ss942: has joined #RubyOnRails
[12:00:40] ss942: But how do I use
[12:00:40] ss942: I can do: WkAccount.joins(:address).where(wk_addresses: {address1: 'ul. Powstańców Śląskich 28'})
[12:00:48] ss942: sql like instead of =?

2019-04-12

[14:44:49] ss942: has joined #RubyOnRails
[14:46:23] ss942: What version of deface gem should I use after vulnerability was found in nokogiri?
[14:46:57] ss942: github told me that I shouldn't use nokogiri <1.8.5 and that deface links to it
[15:25:44] ss942: has left #RubyOnRails: ()

2019-03-26

[15:01:42] ss942: has joined #RubyOnRails
[15:04:08] ss942: https://dpaste.de/vQE5 ← why that happen? I mean "CustomFieldsHelper.instance_methods.include? :show_value" returns true, but when i call it with CUstomFieldsHelper.show_value it returns undefined_method. Why?
[17:06:52] ss942: Remote host closed the connection

2019-03-22

[12:18:29] ss942: Any cool videos with tips and tricks in Rails? (something ~1h long would be great)
[12:34:04] ss942: has left #RubyOnRails: ()

2019-03-21

[01:04:48] ss942: has joined #RubyOnRails
[01:27:26] ss942: Takes less than secounds, but centuries when I do:
[01:27:26] ss942: Project.first.documents.joins("LEFT JOIN custom_values AS cv ON custom_values.customized_id = documents.id AND custom_values.custom_field_id = 55").limit(5)
[01:27:26] ss942: I have problem with .order() inside controller, when I add this query takes centuries. And I have no idea how to fix it.
[01:27:27] ss942: Any tips?
[01:27:27] ss942: Project.first.documents.joins("LEFT JOIN custom_values AS cv ON custom_values.customized_id = documents.id AND custom_values.custom_field_id = 55").order(custom_values.value).limit(5)

2019-03-19

[11:20:38] ss942: has left #RubyOnRails: ()
[15:06:33] ss942: has joined #RubyOnRails
[15:08:19] ss942: When use :replace => "erb[silent]:contains('@grouped.keys.sort.each')",
[15:08:19] ss942: Hello, how can I replace whole loop in erb file with Deface gem?
[15:08:20] ss942: Would it replace whole loop or just first tag with <% @grouped.keys.sort.each do |group| %>?
[16:03:01] ss942: Quit: Leaving.

2019-03-18

[12:02:44] ss942: has joined #RubyOnRails
[12:05:39] ss942: If the second answer is closer to true, any tips on how I rewrite this if part "documents.includes(:attachments, :category).to_a" is must have?
[12:05:39] ss942: I'm writing Redmine plugin, and I wonder if when I do pagination in this place[13::], would it change a way things are grouped? I mean would it group all documents, or just all for each page of pagination?
[12:05:39] ss942: https://github.com/lapinskik/paginated_documents/blob/master/lib/pagination_documents_patch.rb

2019-03-15

[16:12:50] ss942: has left #RubyOnRails: ()

2019-03-14

[19:34:31] ss942: has joined #RubyOnRails

2019-03-13

[18:25:36] ss942: has joined #RubyOnRails
[18:27:02] ss942: Any tips on how to use deface gem to override view in place just after loop? I know that it would be :insert_after but I have problem with creating correct erb selector
[21:40:00] ss942: https://stackoverflow.com/questions/55149517/spree-deface-selector-on-erb-loop
[21:40:07] ss942: I really need help with deface gem
[22:39:31] ss942: has left #RubyOnRails: ()

2019-03-12

[09:27:19] ss942: has joined #RubyOnRails
[09:28:08] ss942: Hello, I can't get how I should name file when using spree/deface
[09:28:36] ss942: is there any sample on github or something like this?
[09:29:01] ss942: I understood what to place in file but I don't know how to name it
[10:02:47] ss942: has joined #spree
[10:03:16] ss942: has left #spree: ()
[10:59:04] ss942: anybody alive there?
[11:45:50] ss942: Any idea why deface dosn't affect? (it's redmine plugin)
[11:45:50] ss942: https://github.com/lapinskik/paginated-documents
[12:49:11] ss942: amperry: Rails.logger.error 'some string'?
[13:46:03] ss942: Ping timeout: 246 seconds
[15:38:51] ss942: has joined #RubyOnRails
[15:46:16] ss942: Remote host closed the connection

2019-02-19

[15:12:45] ss942: has left #RubyOnRails: ()

2019-02-18

[16:00:31] ss942: has joined #RubyOnRails
[16:07:16] ss942: I have a little experience with RoR , I just wrote some features for an redmine open source plugin like 6 months ago, and it was last time I seen Ruby.
[16:07:16] ss942: Can I write totally my own view and override route of main app by route inside my plugin somehow?
[16:07:16] ss942: What should I know if I want to create redmine plugin that adds pagination to Documents?
[16:13:21] ss942: prestorium: I forgot too much to think about this. Thank you a lot
[16:14:25] ss942: oh there are no hooks for documents...

2018-11-16

[14:48:27] ss942: has joined #RubyOnRails
[15:14:44] ss942: python-redmine lib have no way to add documents. Documents dosen't even have rest API, at least attachments have but I see no way to set up contrainer
[21:42:03] ss942: has left #RubyOnRails: ()

2018-11-13

[12:48:07] ss942: has joined #RubyOnRails
[13:07:16] ss942: But in this place →https://github.com/lapinskik/redmine_wktime/blob/master/app/views/wkcustomfields/_relations.html.erb pagination would just pass last params[:current_section]
[13:07:16] ss942: I'm making something with Redmine Plugin (ERPMine) and I have JQuery accordion in an place. I want it to open specified section on document ready, and I'm doing it.
[13:07:17] ss942: Any tips? Redmine paginations don't look like it would allow me to change params... ( https://www.rubydoc.info/github/redmine/redmine/Redmine/Pagination/Paginator )
[13:07:17] ss942: I want it to replace it with index value (it's 100% sure it would be also accordion value)
[17:11:31] ss942: has left #RubyOnRails: ()

2018-11-06

[11:35:07] ss942: has joined #RubyOnRails
[11:38:14] ss942: while it should add these params to previous link, how do I do that?
[11:38:14] ss942: http://redmine.mydomain.something/wkcrmaccount/edit?utf8=%E2%9C%93&searchlist=Zg%C5%82oszenia+firmy&cfName=&cfName=&linkTo=
[11:38:14] ss942: Is url were I put form_tag(search engine), but when I do it redirects to:
[11:38:14] ss942: http://redmine.mydomain.something/wkcrmaccount/edit?account_id=2708&address_id=14127&sort_Zgłoszenia+firmy_by=updated_on-asc
[20:29:40] ss942: has left #RubyOnRails: ()

2018-11-05

[13:28:49] ss942: has joined #RubyOnRails
[13:30:55] ss942: is there something like params merge for form field?
[13:31:46] ss942: form tag*
[14:32:43] ss942: Why in seven hells does it render method=post?
[14:32:43] ss942: <%= form_tag(params.merge( :controller => controller_name, :action => "edit", method: :get)) do %>
[16:23:48] ss942: has left #RubyOnRails: ()

2018-10-25

[14:13:39] ss942: has joined #RubyOnRails
[17:20:34] ss942: Quit: Leaving.

2018-10-23

[13:49:27] ss942: has joined #RubyOnRails
[13:56:42] ss942: has left #RubyOnRails: ()

2018-10-22

[13:53:41] ss942: has joined #RubyOnRails
[13:57:58] ss942: useful links: https://www.rubydoc.info/github/edavis10/redmine/IssuesController https://www.rubydoc.info/github/edavis10/redmine/DocumentsController
[13:57:58] ss942: But same dosn't work for documents, is there a way to do it for documents?
[13:57:58] ss942: When I create issue, I can set back_url parameter and it would redirect me to path than been set after creation of new issue new?continue=true&back_url=google.com
[13:57:58] ss942: I asked on Redmine channel and got no answer, so I try here.
[14:42:52] ss942: Quit: Leaving.

2018-10-19

[13:05:16] ss942: has joined #RubyOnRails
[13:08:12] ss942: doesn't make any sense, because it looks for [custom_field_value][48] in :issues taking it as an array
[13:08:12] ss942: :issue[custom_field_values][48] => 1
[13:08:12] ss942: exactyly what I need to have in my href is /projects/1/issues/new?issue[custom_field_values][48]=1
[13:08:12] ss942: How do I generate link with link_to that have parametrs with []?
[15:22:20] ss942: It renders <option selected="selected" value="1">Serwis</option> in my html, but still this option is not displayed as selected in my browser...
[15:22:20] ss942: Strange... I use <%= select_tag(select_id, options_for_select(options_for_project_select, selected: wkcustomfield.projects_id )) %>
[15:25:56] ss942: It still display last value I selected, even if I reload page, and even if first one have option selected="selected"
[15:26:02] ss942: what the hell
[17:05:09] ss942: I mean I want to get "/wktime/index" instead "https://www.redmine.mydomain.com/wktime/index"
[17:05:09] ss942: I need url for where I'm but not full path
[17:34:03] ss942: https://www.rubydoc.info/github/edavis10/redmine/DocumentsController
[17:34:30] ss942: this ignore my ?back_url=/wktime/index
[17:50:04] ss942: has left #RubyOnRails: ()

2018-10-18

[12:39:38] ss942: has joined #RubyOnRails
[12:39:42] ss942: Any idea how to look for projects?
[12:39:42] ss942: I signed up for open source event as a mentor, they only wanted me to have social skill, and know how to do pull request.
[12:39:42] ss942: How to find open source projects to contribute in?
[12:47:28] ss942: halogenandtoast: yes, and thanks
[17:02:47] ss942: How to fix it?
[17:02:47] ss942: instead of: onclick="get_project(event, 'new_document_link_for_zgłoszenia_firmy', 'project_for_zgłoszenia_firmy')
[17:02:47] ss942: renders: onclick="get_project(event, &#39;new_document_link_for_zgłoszenia_firmy&#39;, &#39;project_for_zgłoszenia_firmy&#39;)"
[17:02:47] ss942: <%= link_to l(:label_new_item, l(:label_document_plural)), url_for(controller: "documents", action: "new", project_id: 1), class: 'icon icon-time-add', id: link_id, onclick: "get_project(event, '#{link_id}', '#{select_id}')"%>
[17:15:19] ss942: has left #RubyOnRails: ()

2018-10-17

[07:18:32] ss942: has joined #RubyOnRails
[07:19:59] ss942: I can't call function from my helper inside partial... I included it in controller, and it works in index.html.erb
[07:20:57] ss942: sevenseacat: give me a minute
[07:27:53] ss942: https://github.com/lapinskik/redmine_wktime/blob/master/app/views/wkcustomfields/_relations.html.erb <- this is the partial
[07:27:53] ss942: https://github.com/lapinskik/redmine_wktime/blob/master/app/views/wkaccount/edit.html.erb <- I render partial there
[07:27:53] ss942: https://github.com/lapinskik/redmine_wktime/blob/master/app/helpers/wkcustomfields_helper.rb <- this is the helper
[07:27:53] ss942: https://github.com/lapinskik/redmine_wktime/blob/master/app/controllers/wkaccount_controller.rb <- controller
[07:30:13] ss942: and method that returns "method or variable not found" is options_for_project_select in 12 line of relations partial
[07:32:02] ss942: >ActionView::Template::Error (undefined local variable or method `options_for_projects_select' for #<#<Class:0x00000000067ae0a8>:0x00007f78b581e540>
[07:34:42] ss942: oh it's copy pasted, from log's before I renamed method
[07:36:25] ss942: sevenseacat: https://pastebin.com/h1i4tkX9
[07:36:43] ss942: hmm strange
[07:37:14] ss942: I hadn't reloaded nginx
[07:37:56] ss942: https://pastebin.com/hjWcKxwk
[07:40:20] ss942: I just don't know why I can't access options_for_project_select I included it in wkaccount_controller, but _relations.html.erb dosen't allow me to see it.
[07:40:25] ss942: to use it*
[08:20:48] ss942: sevenseacat: thank you very much
[13:29:18] ss942: Quit: Leaving.

2018-10-03

[08:59:46] ss942: has joined #RubyOnRails
[09:05:55] ss942: TOne.joins("INNER JOIN t_two ON t_two.id = t_one.t_two_id") .where("LOWER(t_two.name) LIKE (?)", "exemple").first().id()
[09:05:55] ss942: I'm trying to do it with Rails, and it's not working in way I predirected. I tried this
[09:05:55] ss942: I want to select id of t_one which t_two.name is equeal to "exemple"
[09:05:55] ss942: I have two tables t_one, t_two... t_one have t_one.t_two_id, t_two have name
[10:13:51] ss942: has left #RubyOnRails: ()

2018-09-20

[07:08:16] ss942: has joined #RubyOnRails
[07:10:52] ss942: I have application, and it's plugin. I want to serve data from plugin in application view (via controller ofc) How do I do it?
[09:31:03] ss942: how do I generate controller for plugin instead of main app?
[09:31:37] ss942: would just cd to plugin folder work?

2018-09-19

[11:43:49] ss942: has joined #RubyOnRails
[11:44:30] ss942: is there something like quick Rails tutorial for Django developers?
[11:44:45] ss942: or should I start from begining?
[12:29:49] ss942: has left #RubyOnRails: ()

2018-04-11

[06:40:40] ss942: has joined #RubyOnRails
[06:42:55] ss942: Helllo, I have some pretty huge (at least for me) projecet from github, and I want to figure out what records in database are populated with what after sending each form (POST) in template. Any tips on where to start if I want to track it?
[06:47:36] ss942: dminuoso: That's great! Thank you very much
[12:59:49] ss942: Ping timeout: 260 seconds

2018-03-23

[11:35:40] ss942: has joined #RubyOnRails
[11:35:57] ss942: What are *.rsb files?
[11:41:52] ss942: sevenseacat: guess that not, some API related things are inside these files
[14:53:30] ss942: has left #RubyOnRails: ()

2018-03-20

[08:32:05] ss942: has joined #RubyOnRails
[08:32:39] ss942: has left #RubyOnRails: ()

2018-03-19

[09:35:45] ss942: has joined #ruby
[09:50:10] ss942: Deadline was yesterday, and I'm wondering where the hell should I start with this? Any tips? Ruby in X minutes, Rails in X minutes, then Rails API, then reading ERPmine code and contributing to it?
[09:50:10] ss942: Right now it even have "some" API, but it makes only one feature from whole system usable from API. I have to contribute, and make more jsons that returns more data, and more actions possible.
[09:50:10] ss942: Ok ladies and gentelmens. I had never wrote single line nor in ruby nor rails. But now is my time. I were Python/Django dev back days. (ok it was just intern) Now I have to write rest API for an open source project - ERPmine (redmine plugin)
[09:51:38] ss942: has joined #RubyOnRails
[09:53:01] ss942: Right now it even have "some" API, but it makes only one feature from whole system usable from API. I have to contribute, and make more jsons that returns more data, and more actions possible.
[09:53:01] ss942: Ok ladies and gentelmens. I had never wrote single line nor in ruby nor rails. But now is my time. I were Python/Django dev back days. (ok it was just intern) Now I have to write rest API for an open source project - ERPmine (redmine plugin)
[09:53:02] ss942: I'm wondering where the hell should I start with this? Any tips? Ruby in X minutes, Rails in X minutes, then Rails API, then reading ERPmine code and contributing to it?
[15:52:13] ss942: Quit: Leaving.

2018-03-16

[09:26:54] ss942: has joined #ruby
[09:27:55] ss942: funny behaviour when I type ruby -v as a root it says me 2.5.0 when I type this with casual user it says ruby is not installed
[09:28:00] ss942: what the hell?
[12:10:19] ss942: has left #ruby: ()