ruby
Call a controller's method from an external ruby script
I\'m creating an external service of my rails app. This is always listening a rabbitmq queue and all their messages should be redirected to some methods of the rails controllers.[详细]
2023-04-13 05:20 分类:问答Rails 3.1 assets pipline CSS and action mailer
I am wondering if it is just my lac开发者_Python百科k of understanding. I have a action mailer that using a bunch of asset via the image_tag and config.action_mailer.asset_host in the config. As I am[详细]
2023-04-13 05:13 分类:问答Trying to search a string for a gets input in ruby
I am having issues searching for a string input by the user using gets. Here\'s the outline: puts \"What are we searching for?\"[详细]
2023-04-13 05:12 分类:问答Sorting an Array of objects given an ordered list of ids
I have a collection of objects @users, each having its id attribute. @users = [#<User id:1>, #<User id:2>][详细]
2023-04-13 05:08 分类:问答Using Capybara to test pure JavaScript application
I\'m having some problems using Sinatra with Capybara. I want to test a pure javascript application. It\'s just a plain index.html that is being served by Sinatra.[详细]
2023-04-13 05:04 分类:问答Immutable resource cannot be modified (DataMapper::ImmutableError)
I have a list of comments stored in a database. I can pull the comment from the database and manipulate it, however, I get the error when I try to update my database again via datamapper.[详细]
2023-04-13 04:51 分类:问答What's the best way to handle logging in and out with multiples scopes/roles with Rails/Devise?
I\'ve been searching through the Devise RDocs, Google, on this site for answers to my question, but no luck.[详细]
2023-04-13 04:50 分类:问答Inefficient Ruby method naming: passing namespace as argument as a way to call methods
There has got to be a more efficient way to do this in Ruby. I have a list of methods that sc开发者_如何学编程rape the same things (title, price) across multiple sites but in slightly different ways b[详细]
2023-04-13 04:07 分类:问答Code example drawing WAVE's spectrum analysis image
Is there an example of drawing WAVE spectrum analysis image开发者_高级运维 like the one below?[详细]
2023-04-13 04:05 分类:问答Accessing the last key–value pair in a Ruby (1.9) hash
As of Ruby 1.9, hashes retain ins开发者_如何学运维ertion order which is very cool. I want to know the best way to access the last key–value pair.[详细]
2023-04-13 03:55 分类:问答