There are optimizations in YAML for YES and NO. Define it this way:
en:
countries:
DE: Germany
NO: Norway
US: USA
and it should work for you.
-Rob
On Mar 31, 2012, at 7:19 AM, Sven Schwyn wrote:
Hi
I've tried this on a virgin Rails 3.2.2 app. If you put the translations
Rails 3.1.3
I am trying to create an administrator page. 'User' table has a field,
admin:boolean, then user having 'admin=true' can only access it, as you
can imagine.
But accessing
http://localhost:3000/admin/user
gives an error,
uninitialized constant UserController
I have
I had developed one Web application using ROR. Application consists of
more than 100 pages. I need to find out the execution time of overall
application ,without browsing all pages in the browser manually.how to
find the execution time ? shall i use shoulda testing framework?
--
Posted via
I have a controller (employee) with it's model and view. Now I need to
write another controller (emp) which would not have any model or view.
This emp controller should be able to invoke all the methods of
employee controller.And eventually be able to represent all the
relevant information.
I
One bump. I have not heard from anyone in 19 hours. Thanks.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To
On 2 April 2012 11:17, Pallav_bfs spalla...@gmail.com wrote:
I have a controller (employee) with it's model and view. Now I need to
write another controller (emp) which would not have any model or view.
This emp controller should be able to invoke all the methods of
employee controller.And
Hi, I am receiving the following error:
ArgumentError
missing :controller
Rails.root: C:/Users/Christopher/Favorites/safety/safety 11/games
Application Trace | Framework Trace | Full Trace
config/routes.rb:4:in `block (2 levels) in top (required)'
config/routes.rb:3:in `block in top
No worries, solved.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
Hey folks,
I'm tracking a periodic ruby crash - about 1 in 10 - when compiling assets
RAILS_ENV=new_staging bundle exec rake assets:precompile --trace
Debian Lenny and Debian Squeeze 6.0.4
https://gist.github.com/2254457
Our code base is quite large - I'm working on a test case to submit to
Hey guys, I've just started with Rails. I'm going through the getting
started tutorial, and I'm running into this error:
ActiveModel::MassAssignmentSecurity::Error in PostsController#update
I know it has to do with the new update and the whitelist attributes,
but I don't have the first idea how to
On Apr 2, 3:14 am, jenna_s jenna.sim...@gmail.com wrote:
Hi Peter,
How did you know that?! Yes, indeed there are 3 SQL queries:
Message Load (0.5ms) SELECT `messages`.* FROM `messages` WHERE
(from_user_id = 3 AND to_user_id = '2' OR to_user_id = 3 AND
from_user_id = '2') ORDER BY
add
attr_accessible :my_attribute_name.
to your model.rb file
tom
On Apr 2, 2012, at 5:33 , aekwolf wrote:
Hey guys, I've just started with Rails. I'm going through the getting
started tutorial, and I'm running into this error:
ActiveModel::MassAssignmentSecurity::Error in
Quoting Pallav_bfs spalla...@gmail.com:
I have a controller (employee) with it's model and view. Now I need to
write another controller (emp) which would not have any model or view.
This emp controller should be able to invoke all the methods of
employee controller.And eventually be able to
Hi,
I have two models, Page and MenuItem, where Page belongs_to MenuItem .
When I delete a page I need to delete also its MenuItem, and vice versa.
The problema is that I can't put a :dependent = :destroy on both
relations because (obviously) this gives an error.
Is there a clean way to solve
On 2 April 2012 17:25, Serafino Picozzi li...@ruby-forum.com wrote:
Hi,
I have two models, Page and MenuItem, where Page belongs_to MenuItem .
When I delete a page I need to delete also its MenuItem, and vice versa.
The problema is that I can't put a :dependent = :destroy on both
relations
GIYF:
Search term was 'rails session config', second result seems to indicate that
this expire_after option is no longer in the Active Record Session:
http://stackoverflow.com/questions/5860950/setting-session-timeout-in-rails-3
Walter
On Apr 1, 2012, at 12:44 PM, David Moeller wrote:
I'm
hi i am using active admin for my app i have a partial with a drop down
list where the menu and recipe are populated this page is to group the
recipe in a menu _menu_recipe.html.erb
%= semantic_form_for [:admin, @menu_recipe] do |f| %
p
%= f.collection_select :recipe_id,
I have pagination on my users table at the moment which works fine as I
only have one search feature for users.
But I now wish to add pagination to my games table but not sure how to
implement it as I have 5 search features for games. I was wondering how
I would go about adding the pagination to
Walter Davis wrote in post #1054653:
GIYF:
Search term was 'rails session config', second result seems to indicate
that this expire_after option is no longer in the Active Record Session:
http://stackoverflow.com/questions/5860950/setting-session-timeout-in-rails-3
Walter
Thanks for the
I am trying to build a rails app I wrote in JRuby.
When I run bundle install it errors out on
yajl-ruby trying to build it as a native extension. I think it must
have some dependency
with a different gem. How can I figure out what is causing it to want
to use that gem or how to
work around it
Christopher Jones wrote in post #1054663:
I have pagination on my users table at the moment which works fine as I
only have one search feature for users.
But I now wish to add pagination to my games table but not sure how to
implement it as I have 5 search features for games. I was wondering
On Mon, Apr 2, 2012 at 11:42 AM, Jedrin jrubia...@gmail.com wrote:
I am trying to build a rails app I wrote in JRuby. When I run bundle
install it errors out on yajl-ruby trying to build it as a native extension.
I think it must have some dependency with a different gem. How can
I figure
I've filed the following bug report with ruby-core
http://bugs.ruby-lang.org/issues/6246
On Monday, 2 April 2012 11:04:51 UTC-4, Jodi wrote:
Hey folks,
I'm tracking a periodic ruby crash - about 1 in 10 - when compiling assets
RAILS_ENV=new_staging bundle exec rake assets:precompile
Thank you!!
On Apr 2, 11:57 am, Tom Meinlschmidt to...@meinlschmidt.com wrote:
add
attr_accessible :my_attribute_name.
to your model.rb file
tom
On Apr 2, 2012, at 5:33 , aekwolf wrote:
Hey guys, I've just started with Rails. I'm going through the getting
started tutorial, and
Ok... I had no idea. I always thought that if you have an
includes,that will automatically resolve to a join because otherwise
this might result in the N+1 problem. I guess I need to read up about
it some more.
One final question: when I return some_user.messages(another_user.id)
to json from my
Hi,
Colin is right, using RVM has lots of advantages! You can have
multiple Rubies and Gem versions, Gemsets for projects, etc. Highly
recommend because without it you're gonna have a tone of Gem version
problems later.
We made a 1 line script for Ubuntu which installs Wayne's RVM, with
RVM
On 2 April 2012 22:03, jenna_s jenna.sim...@gmail.com wrote:
Ok... I had no idea. I always thought that if you have an
includes,that will automatically resolve to a join because otherwise
this might result in the N+1 problem. I guess I need to read up about
it some more.
One final question:
There is no reverse, it's a regular has_one belongs_to association. i
just wanto to be able to delete both records either by deleting a page
from the pages_controller or by deleting a menu_item from the
menu_items_controller. in both cases both the page and the menu item
need to be deleted
Hi guys,
I must be missing something obvious with pessimistic locking. Here is
what I do (Rails 2.3, mySQL):
In my Foo model:
def test
Foo.transaction do
lock = UpdateLockForFoo.find_by_foo_id(self.id, :lock = true)
sleep 30
end
end
For each Foo model, I have an UpdateLockForFoo.
On Mon, Apr 2, 2012 at 3:10 PM, Serafino Picozzi li...@ruby-forum.com wrote:
There is no reverse, it's a regular has_one belongs_to association. i
just wanto to be able to delete both records either by deleting a page
from the pages_controller or by deleting a menu_item from the
Hassan Schroeder wrote in post #1054715:
On Mon, Apr 2, 2012 at 3:10 PM, Serafino Picozzi li...@ruby-forum.com
wrote:
There is no reverse, it's a regular has_one belongs_to association. i
just wanto to be able to delete both records either by deleting a page
from the pages_controller or by
Assuming you're using rvm, create a separate gemset and do your
`bundle install` with MRI and then examine the Gemfile.lock that's
been built.
Thanks, but I am on windows. I found a FAQ that says RVM doesn't run
on windows.
--
You received this message because you are subscribed to the
On Mon, Apr 2, 2012 at 3:48 PM, Serafino Picozzi li...@ruby-forum.com wrote:
There is no reverse, it's a regular has_one belongs_to association. i
just wanto to be able to delete both records either by deleting a page
from the pages_controller or by deleting a menu_item from the
On Mon, Apr 2, 2012 at 3:53 PM, Jedrin jrubia...@gmail.com wrote:
Thanks, but I am on windows. I found a FAQ that says RVM doesn't run
on windows.
I believe there's an equivalent for Windows, or you could use a VM to
isolate the experiment from your regular installation, but that's really
Probably then it's related to the awesome_nested_set plugin... This
sucks it's already the second plugin I'm trying to use (the other is
cancan) that breaks some core functionality
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google
Hi Walter,
Again, my apologies for the delay in reply. I'm more confused now
than before, so it took some time to poke around.
Firstly, I don't run a separate development and production server.
Does that matter?
Installed are rake (0.9.2.2) and bundler (1.0.21). I have not run
bundle install
Typo: product listing are NOT displayed :(
On Apr 2, 8:39 pm, Kal calcr...@gmail.com wrote:
Hi Walter,
Again, my apologies for the delay in reply. I'm more confused now
than before, so it took some time to poke around.
Firstly, I don't run a separate development and production server.
Hi L,
therubyracer (0.9.9) is already installed :(
Thanks Anyway :)
~Kal
On Mar 31, 7:51 am, Firstname L. li...@ruby-forum.com wrote:
Ok this might sound funny but , this problem is usually caused by lack
of javascript libraries in your rails setup so i would recommend you to
do this .
On Mon, Apr 2, 2012 at 4:19 PM, Serafino Picozzi li...@ruby-forum.com wrote:
Probably then it's related to the awesome_nested_set plugin...
Well, I just added awesome_nested_set (as a gem) to my little test
app, and it didn't have any effect on using :dependent = :destroy.
You might want to
On Apr 2, 2012, at 8:39 PM, Kal wrote:
Hi Walter,
Again, my apologies for the delay in reply. I'm more confused now
than before, so it took some time to poke around.
Firstly, I don't run a separate development and production server.
Does that matter?
If you start rails with rails
On Apr 2, 2012, at 9:06 PM, Hassan Schroeder wrote:
On Mon, Apr 2, 2012 at 4:19 PM, Serafino Picozzi li...@ruby-forum.com wrote:
Probably then it's related to the awesome_nested_set plugin...
Well, I just added awesome_nested_set (as a gem) to my little test
app, and it didn't have any
Hi Walter,
Very sorry for the confusion.
When I mention server, I'm actually referring to the box, not a
service(s).
I'm actually running everything from a virtual dedicated server
(through GoDaddy.com).
I'm not testing any of the aforementioned items on a desktop nor am I
deploying to Apache
On Apr 2, 2012, at 10:15 PM, Kal wrote:
Hi Walter,
Very sorry for the confusion.
When I mention server, I'm actually referring to the box, not a
service(s).
I'm actually running everything from a virtual dedicated server
(through GoDaddy.com).
I'm not testing any of the
Great! Thanks everyone for the help.
On Apr 2, 2:11 pm, Colin Law clan...@googlemail.com wrote:
On 2 April 2012 22:03, jenna_s jenna.sim...@gmail.com wrote:
Ok... I had no idea. I always thought that if you have an
includes,that will automatically resolve to a join because otherwise
44 matches
Mail list logo