RailsCasts Pro episodes are now free!

Learn more or hide this

Ben Koshy's Profile

GitHub User: BKSpurgeon

Comments by Ben Koshy

Avatar

Does anybody have a java script implementation of this?

Avatar

Does anybody have a java script implementation of this?

Avatar

Does any body know a way of dragging different articles to different days - to change the dates of those particular records?

Avatar

Hi all

Let's suppose we have an existing rails app (just a basic scaffold - with it's own controllers).

Does this mean, if I am building an API, that I have to write another controller - an API controller?

Would be interested to hear your thoughts. chrs

Ben

Avatar

Hi did you discover the answer to this question? I wanted to ask it as well!?

Avatar

Ok guys for those using Rails 4 and up:

go to this file: filter_parameter_logging.rb in config/initializers folder:

You will notice that this is already in there: Rails.application.config.filter_parameters += [:password]

that means all parameters with the word "password" in it will be filtered out. But you are not safe yet! You also need to ensure that you are not logging the sql entries. In order to check that you need to ensure that in:

config/environments/production.rb

there is a line like this:

config.log_level = :info

make sure that the log_level is anything BUT NOT :debug.

and then you are more protected. I would suggest in the production environment to have something above :info. Info is a little too insecure in my opinion.

I hope this post helps someone!

Ben

Avatar

Is there a way of autoselecting (via Ajax let's say for example) similar associations? if you have examples please do share.

Avatar

ArgumentError in ProductsController#discontinue
wrong number of arguments (2 for 1)

I'm getting an error here. anybody know how to fix that. It happens in the products controller, in the discontinue action (which we custom created), on this line:

Product.update_all({discontinued: true}, {id: params[:product_ids]})

Avatar

Hi folks

what if in the form we are setting remote = true then none of this will work because we are using ajax and preventing the form from refreshing? If you have any idea please hit the reply button.

with thx

Ben

Avatar

I've also downloaded the "before" example from Ryan's github page and am trying to work towards the "final" result when i click the new link it redirects to the new page as opposed to letting JQuery do its magic. Does any body have any suggestions?

Avatar

Hey Bala

Suppose each person has the following attributes: country, state and name.

Do you know how one can create 10 people, all from the same Country and State, in the same form................at the moment using your solution and Ryan Bates' i would have to Reselect the same country and state 10 times. The only thing that is different between all 10 people are their names.

Any advice much appreciated.

rgds

Ben

Avatar

Does anybody know what the difference between find_by and find_by_all is?

Avatar

HI folks

do you know if there is a datatable which allows you to see child rows (collapsible) and which has CRUD links - like with scaffolding? I could really use one such table like that right now ;)

chrs

Ben

Avatar

Hi folks

was hoping for some advice:

My nested form is starting to become increasingly large and complex. I would like to collapse certain things. Is this possible?

Also is it possible to view only certain children via a drop down menu? any advice much appreciated.
rgds
Ben

Avatar

it was way too fast for me :'(

Avatar

hello thanks for the gem Ryan.

you asked for comments & feedbacks here it is: i found it (the video) a little confusing some parts where rushed in explanation, but in any case, i will try the documentation and then ask questions if need be.

Avatar

hi folks, I am getting an: "uninitialized constant QuoteController::Prawn" error.

at the following line (with the code in the relevant controller):

                    format.pdf do
---> here --->  pdf = Prawn::Document.new

anybody have any ideas? It's giving me grief!