TheMonster

Activity Graph

Page 1 of 2 | Next »

2017-05-11

[17:51:40] TheMonster: Quit: See you later :)

2017-05-03

[22:28:45] TheMonster: Ping timeout: 240 seconds

2017-03-13

[17:30:23] TheMonster: Ping timeout: 264 seconds
[17:33:18] TheMonster: has joined #RubyOnRails

2016-07-24

[22:19:45] TheMonster: I want to create an enum that has one of the values called "new". is there a way to create it like that without causing conflict with the new method of the model?
[22:36:29] TheMonster: Alright, thanks

2016-07-05

[00:06:22] TheMonster: has joined #RubyOnRails

2016-07-04

[23:50:52] TheMonster: Ping timeout: 264 seconds

2016-07-02

[05:04:52] TheMonster: *.net *.split

2016-06-29

[09:09:39] TheMonster: While trying to include attributes of a nested model in JSON, I used :include => :nested_model, can I have the attribute that shows that model :nested_model_attributes instead of :nested_model ? I want the update and get to be using same JSON format
[09:20:42] TheMonster: Solved my problem, not sure it's the best way but let me say it anyways: instead of :include I used :methods => :nested_model_attributes and defined nested_model_attributes to return nested_model

2016-06-23

[15:55:45] TheMonster: rubyonrails372: as far as I know, Heroku doesn't delete the files after some time... It's just that it doesn't have a permanent storage option so you don't have a store
[15:55:51] TheMonster: Openshift has one
[15:56:44] TheMonster: just make sure to save your files and retrieve them from that permanent storage directory
[15:57:45] TheMonster: I think you mean when your dyno goes to sleep? that's because a new instance of the app is launched
[15:59:16] TheMonster: when you push too
[15:59:22] TheMonster: I wouldn't call that "delete files"
[15:59:25] TheMonster: they just don't keep them
[16:00:14] TheMonster: rubyonrails372: not if you put them in the public directory for example... There's a specific directory that keeps the files
[16:00:38] TheMonster: you need to find out its name... I can't remember it... It's present in an ENV variable

2016-06-19

[02:05:40] TheMonster: Ping timeout: 272 seconds
[02:13:44] TheMonster: has joined #RubyOnRails
[04:26:49] TheMonster: Ping timeout: 260 seconds
[04:31:56] TheMonster: has joined #RubyOnRails

2016-06-16

[10:56:39] TheMonster: has left #ruby: ("Konversation terminated!")
[13:29:30] TheMonster: If I'm using shallow nesting and I want to make a specific custom action be available for the nested version not the top one. How can I do that?
[13:34:21] TheMonster: Alright, thanks :)

2016-06-11

[16:02:27] TheMonster: has joined #ruby

2016-06-08

[13:03:09] TheMonster: has joined #RubyOnRails
[13:05:43] TheMonster: I can say has_many :projects, through: :companies then say person.projects to get all projects of all companies. Is there a way to do a query person.companies.projects without that has_many?
[14:53:10] TheMonster: I can say has_many :projects, through: :companies then say person.projects to get all projects of all companies. Is there a way to do a query person.companies.projects without that has_many?

2016-06-05

[03:50:04] TheMonster: Ping timeout: 260 seconds
[03:51:45] TheMonster: has joined #RubyOnRails
[04:08:09] TheMonster: Ping timeout: 260 seconds
[04:09:47] TheMonster: has joined #RubyOnRails
[05:20:03] TheMonster: Quit: See you later :)

2016-06-03

[10:04:39] TheMonster: Ping timeout: 260 seconds
[10:12:34] TheMonster: has joined #RubyOnRails
[10:24:29] TheMonster: Ping timeout: 260 seconds
[10:31:01] TheMonster: has joined #RubyOnRails

2016-05-19

[14:11:40] TheMonster: alfie_max15: check savon

2016-05-06

[10:56:53] TheMonster: For using the russian doll caching, if the model table didn't contain an updated_at column and it was just added lately so all values in it are nil, would things work correctly or I need to set updated_at for all rows to be Time.now or someting so that it works?
[11:17:08] TheMonster: Reasking: For using the russian doll caching, if the model table didn't contain an updated_at column and it was just added lately so all values in it are nil, would things work correctly or I need to set updated_at for all rows to be Time.now or someting so that it works?
[11:28:14] TheMonster: For using the russian doll caching, if the model table didn't contain an updated_at column and it was just added lately so all values in it are nil, would things work correctly or I need to set updated_at for all rows to be Time.now or someting so that it works?
[11:29:08] TheMonster: sevenseacat: sorry. Thought no one saw it and actually when I saw you writing thought you might know and haven't seen it. Sorry :(
[11:46:01] TheMonster: Just for the record. It seems that fragment caching works correctly when updated_at = nil, since I'm seeing lots of READ /views/fragments in the logs.
[11:46:15] TheMonster: fragment --> Russian doll *

2016-05-04

[23:55:26] TheMonster: void__: http://guides.rubyonrails.org/getting_started.html

2016-05-02

[15:21:39] TheMonster: Ping timeout: 260 seconds
[15:40:03] TheMonster: has joined #RubyOnRails

2016-04-28

[12:03:34] TheMonster: Can I specify a condition for a scope where the condition is on an associated model. If my model belongs_to human, I want to say in the scope condition (self.human.male: true). Is that possible?
[12:04:40] TheMonster: Thanks rvanlieshout :)
[22:05:24] TheMonster: Ping timeout: 260 seconds
[22:06:15] TheMonster: has joined #RubyOnRails

2016-04-24

[12:21:31] TheMonster: has joined #RubyOnRails
[12:28:44] TheMonster: Hi, when in my application I want to show some page that's something you see just after you log in that contains lists of different items from several models(Something like a dashboard). Should I just create a controller DashboardController with a single method in it? Is there a standard way to do something similar?
[12:42:43] TheMonster: fox_mulder_cp: Alright but what is the controller that's responsible for rendering the response?
[12:44:08] TheMonster: Alright, Thanks tildes and thanks fox_mulder_cp :)
[12:46:34] TheMonster: yes, I tried to Google but nothing really fits my use. Best suggestion I saw was to use something called WidgetsController whose index action would be the dashboard and the show would be giving a single (list of something) in response to AJAX calls for example
[12:50:12] TheMonster: tildes: actually after rethinking... I just reframed it to my case... I initially understood that this the suggestion was to use it for stats dashboards(so total aggregation)... When I said it here, I reframed it to my use... I got confused, this is what I should be using actually :D
[12:50:31] TheMonster: total aggregation, I mean to get total numbers not lists of items
[12:56:05] TheMonster: sevenseacat: Thanks :). I actually keep going back and forth every minute thinking that one of the approaches is better than the other and then going back
[12:57:08] TheMonster: Alright cool. Thanks for the advice
[13:27:34] TheMonster: Are you sure you mentioned the right person? I understand nothing :D
[13:31:55] TheMonster: Ah I see. I don't want to go that path right now though but thanks for the suggestion. I think it can be of help in the future :)

2016-02-10

[15:21:09] TheMonster: has joined #RubyOnRails
[15:23:44] TheMonster: Hi, say I have a Project model which has a public attribute set to true if the project is public, otherwise set to false. In the index method of the ProjectsController I want to show all projects that are public or belong to the current user(they are private to everyone but him). Is there a way to achieve that using default_scope(i.e without changing controller method)?
[15:24:04] TheMonster: a public attribute => a "public" attribute *
[16:28:34] TheMonster: has left #RubyOnRails: ("Konversation terminated!")
[16:50:17] TheMonster: has joined #RubyOnRails

2016-01-19

[22:46:17] TheMonster: has joined #RubyOnRails
[23:10:07] TheMonster: Quit: See you later :)
[23:10:21] TheMonster: has joined #RubyOnRails

2015-12-24

[00:53:56] TheMonster: Write error: Broken pipe

2015-12-22

[19:47:52] TheMonster: if I'm using default Rails.cache, wouldn't it be concurrent for all threads running on Heroku? I'm trying to use it to prevent some race condition
[19:49:06] TheMonster: oh... Thanks FailBit :)
[19:50:46] TheMonster: uberjar: I'm using the default memorystore
[19:53:21] TheMonster: I want to prevent some controller method from entering a block and instead redirecting somewhere if that method is already being processed by another request with the same parameter value

2015-12-17

[17:18:07] TheMonster: I want to apply this in a rails app: https://github.com/bluedragonz/bad-bot-blocker/blob/master/.htaccess
[17:18:30] TheMonster: I believe https://github.com/kickstarter/rack-attack is the way to do it. Is there a better way?
[17:24:13] TheMonster: Unfortunately, not using Apache.
[17:25:52] TheMonster: Thanks tubbo :)

2015-12-13

[18:06:10] TheMonster: Ping timeout: 240 seconds
[19:39:05] TheMonster: has joined #RubyOnRails

2015-12-12

[17:42:17] TheMonster: *.net *.split

2015-12-07

[11:17:02] TheMonster: Hi, is it possible to get raw SQL queries needed to create the database tables somehow from the schema.rb file? I want to get a query that I can write in phpMyAdmin to form the same database that will be formed when I do rake db:schema:load
[11:39:41] TheMonster: fox_mulder_cp: Thanks a lot

2015-12-02

[15:39:32] TheMonster: *.net *.split
[16:47:57] TheMonster: has joined #RubyOnRails

2015-11-26

[19:02:02] TheMonster: *.net *.split

2015-11-15

[01:46:35] TheMonster: Ping timeout: 250 seconds
[02:01:31] TheMonster: has joined #RubyOnRails

2015-11-14

[05:51:11] TheMonster: Ping timeout: 250 seconds
[05:56:04] TheMonster: has joined #RubyOnRails

2015-11-12

[11:15:26] TheMonster: yahooanswersftw: you can say the problem without asking that :)
[11:19:36] TheMonster: yahooanswersftw: may be you should replace kind with kid ?
[11:23:23] TheMonster: oh ok I'm sorry... may be you should wait for someone more experienced
[11:23:43] TheMonster: I thought it was a typo sorry
[11:26:15] TheMonster: actually... After reading the link you linked to... kind is specific to the class in the guide... You should only use it if kind is an attribute of your class
[11:27:34] TheMonster: so replace it with some attribute in relatives and try
[11:51:07] TheMonster: no clue sorry yahooanswersftw

2015-10-16

[00:13:46] TheMonster: has joined #RubyOnRails

2015-09-28

[01:38:53] TheMonster: Ping timeout: 250 seconds
[01:43:24] TheMonster: has joined #RubyOnRails

2015-09-14

[01:24:50] TheMonster: Ping timeout: 250 seconds
[01:28:09] TheMonster: has joined #RubyOnRails

2015-09-13

[01:40:02] TheMonster: Ping timeout: 250 seconds
[01:45:47] TheMonster: has joined #RubyOnRails

2015-08-17

[01:26:12] TheMonster: Ping timeout: 250 seconds
[01:39:38] TheMonster: has joined #RubyOnRails

2015-08-11

[22:46:33] TheMonster: hello, I have a function that somehow feels... not elegent... Does anyone have an idea how I can make these types of functions better? http://pastie.org/10344930

2015-08-09

[01:38:10] TheMonster: Ping timeout: 250 seconds
[01:53:46] TheMonster: has joined #RubyOnRails

2015-08-02

[01:38:47] TheMonster: Ping timeout: 252 seconds
[01:45:40] TheMonster: has joined #RubyOnRails
[15:46:47] TheMonster: Ping timeout: 240 seconds
[15:52:42] TheMonster: has joined #RubyOnRails

2015-07-12

[11:46:27] TheMonster: If I want to define a class that does some functions including calling methods inside some of the app models. Where should I put that class? lib folder? app/classes?
[11:49:09] TheMonster: Papierkorb: Alright, Thanks :)

2015-07-03

2015-07-01

[14:46:41] TheMonster: *.net *.split
[15:15:15] TheMonster: has joined #RubyOnRails

2015-06-23

[11:51:38] TheMonster: My rspec tests sometimes fail with an "uninitialized constant ModelName" where ModelName is a defined Model... It sometimes fail and sometimes succeed... Can someone guess a reason of that?
[11:52:10] TheMonster: the code for tests or model?

2015-04-27

2015-04-26

[10:08:24] TheMonster: help_me: @post does not exist.. May be try to initialize it?

2015-04-24

[14:17:36] TheMonster: 4 or 5 seems like a big number forsure
[14:20:52] TheMonster: DylanJ: must be so distracting... It takes me time to context switch if I'm working on more than 1 project(Although usually not all projects are in the same language)
[14:22:43] TheMonster: aha... I'm still not used to vim and can't take the step of trying to get used to it :)
[14:24:34] TheMonster: and in the other situations :) ?
[14:26:12] TheMonster: I used it a few times and didn't try to do that
[14:26:24] TheMonster: but I'd be surprised if it's not possible
[14:26:33] TheMonster: ACTION uses aptana
[14:26:53] TheMonster: I'm used to eclipse style in all languages so it suits me well
[14:27:21] TheMonster: yeah, I planned to lots of times but never did it :)
[14:27:34] TheMonster: |RicharD|: why? is it that bad?
[14:28:50] TheMonster: can't remember it crashed with me before
[14:28:56] TheMonster: but its terminal has some problems
[14:29:06] TheMonster: sometimes it just freezes

2015-04-18

[22:23:43] TheMonster: Say I have some Issue model and I want to list issues in index depending on their state(closed or open for example). I had made a scope in the model (closed and still_open), now I used to do "Issues.send(params[:state])" in the controller which introduces security issues. What's the best alternative to do it?
[22:32:36] TheMonster: Thanks nickjj :). How should I call it from the controller in that case?
[22:33:41] TheMonster: I guess a "where" ?
[22:35:05] TheMonster: no, I like the built in scopes but in the controller I want to do Issues.send(params[:state]) for example but that's a security issue. Just wanted to know if there's a better way than writing a Where in the controller
[22:36:10] TheMonster: great! Thanks a lot nickjj :)
[22:36:44] TheMonster: yeah I realize that :)
[22:38:12] TheMonster: ok Thanks again :)
[22:39:36] TheMonster: yeah! That's great! Just what I was looking for
[22:47:49] TheMonster: chipotle: check https://www.ruby-toolbox.com/

2015-04-14

[21:37:43] TheMonster: hello, I want to join file names similar to what File.join does but when I do File.join('','something'), the result is a string with '/' prefix. Is there a way/method to ignore empty strings?
[21:38:40] TheMonster: jhass: a variable
[21:39:00] TheMonster: jhass: destination of a file
[21:39:14] TheMonster: dudedudeman: what's that?
[21:39:41] TheMonster: ok so I think you mean an if else.. Thanks
[21:41:07] TheMonster: jhass: I provided the context... It's nothing private... If you could tell me what vague about 'Destination of a file'?
[21:43:31] TheMonster: quesker: Thanks! your suggestion worked :)
[21:43:46] TheMonster: jhass: thanks, it's resolved now

2015-04-09

2015-04-06

[03:49:57] TheMonster: while writing tests, if I want to test that the current path is equal to something, is it a good practice to use path helpers or should I write the link directly?
[12:34:06] TheMonster: vedu: v1_devices vs c1_products :)
[12:34:14] TheMonster: v1_products*

2015-04-05

[09:45:12] TheMonster: is there a way to add an optional scope to members of resource and to embedded resources as well? look here: http://pastebin.com/DwkF0fti
[09:46:12] TheMonster: http://pastie.org/10074616
[09:49:58] TheMonster: jhass:that worked but causes the scope to be before the id of the resource members. Isn't there a way to make it after them?
[09:50:46] TheMonster: I tried to do it like that at the beginning but something went wrong
[09:50:51] TheMonster: I can't recall it so let me do it again :)
[09:52:00] TheMonster: jhass: yeah same thing issues... the scope is alright for things in the members but not for the nested resource
[09:52:07] TheMonster: same issue happens*
[09:52:26] TheMonster: it becomes before the id of the main resource
[09:52:49] TheMonster: I want it to be after the id of the main resource
[09:56:09] TheMonster: jhass: http://pastie.org/private/vyt6flrkda8xvgcxxx63vw sorry for the messed line... I can't fix it ...
[09:57:34] TheMonster: I want the scope to be after the id of the projects not the products
[10:02:54] TheMonster: yeah... works like a charm :) Thanks jhass :-)

2015-03-29

[07:52:46] TheMonster: it avoids escaping the contents I think
[07:53:05] TheMonster: oh it escapes them :)

2015-03-24

[20:51:45] TheMonster: Using Rugged gem, is there a way to walk through the history of a certain blob just seeing the commits where it was modified?

2015-03-23

[18:49:31] TheMonster: ScottyKnows: I didn't see the discussion from the beginning, nor can I be of any help... Was just wondering $75-$150 per what, if I may ask that question?
[18:50:14] TheMonster: I'm guessing it's something related to RoR development and I want to know the range
[18:50:22] TheMonster: Aha Thanks :)
[18:50:47] TheMonster: Thanks again :)

2015-03-22

[03:41:12] TheMonster: I've done lots of search so I'm kinda sure there'd be no answer but just in case there's something simple that I missed... Is there some gem that would allow one to make a git hosting server using Rails... Making something similar to Gitlab?
[03:44:33] TheMonster: alyyy: where should I put the git repositories to allow people to clone them? Putting them in the public folder doesn't work
[03:44:36] TheMonster: bricker: thanks
[03:44:51] TheMonster: Radar: that's what I'm doing... Just wanted to make sure there's nothing simpler
[03:45:30] TheMonster: I see :) Thanks everyone
[03:46:24] TheMonster: Thanks alyyy :)

2015-03-21

[11:15:34] TheMonster: is there a way with a has_many relationship to append an object in one line? for example User.projects.append(@project) instead of doing User.projects << @project & User.save ?
[11:16:33] TheMonster: oh append is what I was looking for

2015-03-20

[21:08:30] TheMonster: link_to "string", xx_path(@params) keeps encoding the linked to path... Is there a way to prevent that?
[21:10:41] TheMonster: smathy: for example if the linked to path contains "repository/myTest" it becomes "repositor%2FmyTest"
[21:14:30] TheMonster: no, I wrote it myself
[21:15:08] TheMonster: Alright.. gimme a sec
[21:19:05] TheMonster: https://gist.github.com/Alwahsh/d1e8a43b575147bed696
[21:23:49] TheMonster: mmm yeah... The routes line is the code
[21:24:15] TheMonster: as: :repo_path
[21:24:18] TheMonster: isn't that it?
[21:29:25] TheMonster: smathy: actually not, it's the one in @product
[21:29:54] TheMonster: @product contains a ""
[21:31:24] TheMonster: no... Let me check :)
[21:34:26] TheMonster: smathy: yes, I'm sure now
[21:42:33] TheMonster: balr0g: raises an unauthorized exception when the user can't do the action he's trying to do
[21:47:18] TheMonster: balr0g: are you sure you didn't rescue from that exception with a redirection to some page?
[21:51:27] TheMonster: if you remove the load_and_authorize_resource, you don't get redirected?
[22:00:34] TheMonster: balr0g: you can use current_user.can? to check for the ability inside a controller method and act accordingly
[22:04:48] TheMonster: balr0g: not entirely sure that the following is the best way but you can do: redirect_to 401_page_url, status: :unauthorized
[22:06:16] TheMonster: render nothing: true, status: :unauthorized
[22:06:33] TheMonster: render :file => "public/401", :status => :unauthorized
[22:07:23] TheMonster: balr0g: I think the last one would work well
[22:09:23] TheMonster: yeah... you can use an if/else then.... Again, I'm not sure this is the best way to do it
[22:09:33] TheMonster: or use a before filter

2015-03-17

[11:18:23] TheMonster: if I have a /projects and /user/projects, is it better to have both routes map to the same controller method and have an if else in the controller or map the first to the index method and the second to a user_index method for example?
[11:22:06] TheMonster: Alright, thanks
[21:03:12] TheMonster: rubyonrailed: try replacing "data-attribute" with :data-attribute

2015-03-16

[23:06:50] TheMonster: if a user has many projects, and I want to have github like links: username/project_name... What should I do in the routes to be able to link to a project using project_path(@project) instead of project_user_path(@user,@project) ?
[23:09:19] TheMonster: Radar: I see. Thanks, but I think there should be a way to do it introduced in rails since the user object can be obtained from the project anyways.
[23:12:45] TheMonster: yeah that's what I'm doing :) Just suggesting that it might be better to introduce something in rails that would work for that
[23:13:37] TheMonster: Radar: sure :)
[23:16:31] TheMonster: yeah I get it... I was just thinking of something like scope :user_id do resources projects, that would be smart enough to detect it... I'm anyways doing it the helpers way after your suggestion. Thanks :)
[23:20:41] TheMonster: there's a lot of /:user/:project/... links that I don't want to keep writing that way
[23:21:35] TheMonster: sorry that you got that impression :) I never meant it
[23:21:59] TheMonster: after all, it actually writes my code for me :
[23:27:13] TheMonster: philcrissman: Thanks for the suggestion :)
[23:29:26] TheMonster: I was just suggesting that if the project will always be linked to a certain user and I'll never link to "project" without user, that I expected Rails to find out the correct route for that project without having to explicitly passing the user... May be it was a bad idea nvm :)
[23:34:23] TheMonster: yup I see thanks philcrissman :)
[23:35:03] TheMonster: well I understand that, I was particularly talking about the linking part

2015-03-13

[00:49:13] TheMonster: if I want to override a method in a model and make it do nothing, is there a better way than doing def method_name end ?
[00:54:11] TheMonster: smathy: Thanks :)

2015-03-12

[21:42:47] TheMonster: microdex: I don't care about the cause... I just want to know what would be the response of the app if that happened
[21:42:57] TheMonster: bricker: Thanks :)