search for: jcpen

Displaying 7 results from an estimated 7 matches for "jcpen".

Did you mean: jchen
2009 Mar 15
5
Setting DEFAULT_FIELD_OPTIONS in Rails 2.3
Hi, I''m having some trouble overriding/defining the default_field_options constant without raising a warning. I''ve tried adding the code to do it in an initializer but that produces a warning (because the constant is already frozen), after some googling I found a recommendation to put it in the environment.rb file but that then that throws uninitialized constant ActionView
2009 Mar 16
4
Overriding ActiveRecord associations for special cases
Hi, Does anyone know a good way to override AR associations to take special cases into account. My current take is the example below which allows the ''root'' user to access all products, but only works if I remember to call it with a .all/.find or similar method: ''user.products.all'' instead of ''user.products''. Ideally I guess I want to return a
2008 Jun 30
3
scaffold usage
is there anyway that scaffold would read the database and I don''t have to specify any of the columns? it is really frustraiting specially when you''ve got a lotta cols and tables! I''d like to use rails for an enterprise app but not a toy app like all those apps in tutorials -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~
2008 Jul 07
6
MiniMagick, and processing thumbnails...
I have a requirement that can''t be that outrageous.... I want to be able to upload an image, and have multiple thumbnails be created for each. Then, I want to post process each image (the main image plus the thumbnails) to add borders. The trick is that the borders need to be different for each image. I thought I could use the after_resize handler, but when I try to add a border to
2008 Aug 21
4
radio_button_tag - examining the selected value
Hi All I have four radio buttons created like this <%= radio_button_tag :answers, 1, false %> a <br/> <%= radio_button_tag :answers, 2, false %> b <br/> <%= radio_button_tag :answers, 3, false %> c <br/> <%= radio_button_tag :answers, 4, false %> d <br/> And then I have a link_to tag to invoke a controller function
2008 Jul 01
8
Scaffolding: Create, Edit, Destroy in admin area
Hi Community, I''m currently trying to create a blog software in rails, but I''ve got a problem: I generated scaffolding for my articles and only want administrators to write, edit or delete articles. So I wanted to move this parts to another, secured controller. The one controller to display articles is called articles :), the other is also called articles, but is located in a
2008 Jul 01
14
rake aborted! Could not find table ...
I am getting a rake aborted error and I suspect that I am missing a package on my system since the app works for a friend on this computer. Here is the terminal output of the error: anita@anitas-computer:~/sandbox/shovell$ rake db:migrate (in /home/anita/sandbox/shovell) rake aborted! Could not find table ''stories'' (See full trace by running task with --trace)