Wordpress themes are beautiful!
Is there any guideline to use Wordpress themes in a rails app? Even better, are there rails app templates which can use the Wordpress themes already?
Thanks!
I am currently investigating possible applications of CouchDB on my current project (written in Rails) and would like to get some feedback from people who have actually used these APIs. Which would you recommend and why?
ActiveCouch
CouchFoo
CouchRest
CouchRest-Rails
CouchPotato
In Rails 'helper :all' makes all your helpers 'available' to all your controllers.
This is concise and convenient, but does it have any memory and/or performance implications compared to explicitly calling the helpers that each controller actually needs?
It's unclear form the docs whether using it involves 'require'ing all those files, or whether autoload is being used. I can't tell from the source in the Rails framework docs.
thanks
HELP!! I need to bundle a gem otherwise a published client's site will stay dead
MacBook-Pros-MacBook-Pro:pn
macbookpro$ sudo ruby script/generate sanitize
Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
using the delcarative_authorization gem for rails, is there a shortcut to allow a role access to all controller actions?
privileges do
# default privilege hierarchies to facilitate RESTful Rails apps
privilege :manage, :includes => [:create, :read, :update, :delete]
end
isn't sufficient, because I have more controlling methods than just CRUD in my controllers.
Something like:
role :foo do
has_permission_on :bar, :to =>[:all]
end
would be perfect, but I'm not finding it in the docs.
Its not the another language debate, its a decision making discussion.
I am a ASP.NET developer, but want to learn other frameworks/language (open source). I don't know from where i should start and why? Django and Rails both seems promising, but i am confused which one i should choose to start, or i should choose some other framework. I know learning the language (python or ruby) is must before start Django or Rails.
Please advise.
How do we monitor that the connectivity between the rails app and the database is established. will rails try to re-connect the connection with mysql if it closes?
I know named_scope has been changed to scope in rails 3.
How do I perform default_scope in rails 3, I've had a good google but found nothing for defaults scopes.
In Rails, is there a way to display different error messages on a production rails server (a nice graphic) vs a development server (detailed error information, stack trace, etc.)?
I've noticed that the Rails log correctly displays the time taken to execute an action in the logs, and that the View: part of that is also rendered correctly. However, the DB: value is always zero:
Aug 11 13:00:22 [2326] INFO: Completed in 2072ms (View: 94, DB: 0) | 200 OK
In fact, all my DB timings are being logged as zero. I'm logging at DEBUG level, in development mode, running Rails 2.3.2.
Apologies in advance if the answer is blatantly obvious.
I would like to find some help building a tree interface in Rails. I've tried using jsTree but am having trouble integrating it properly into Rails.
Thanks.
Hi guys,
I'm developing JAX-RS application and it's working fine. Now, i want to develop web service client application using Rails. And my question is which is the best way to parsing RESTfull webservice's response in Rails?
I have a rails application that allows searches using longitude and latitude. I have added a 'pretty' route with:
map.connect 'stores/near/:longitude/:latitude', :controller => 'stores', :action => 'index'
This works for integer latitude and longitude values (http://localhost:3000/stores/near/-88/49) but fails for decimal values (http://localhost:3000/stores/near/-88.341/49.123) giving:
Routing Error
No route matches "/stores/near/-88/49.0" with {:method=>:get}
Any ideas how to use pretty URLs in rails with decimals?
In a blog in Rails I want to have paths like
http://mydomain.com/posts/28383/comments#21
This is the 21st comment of the 28383th post. The 21 is not an unique id, but the pair 28383, #21 is unique.
How can I do this in Rails? Do I have to change the routes? the model?
I will be very thankful if you can point me in the right direction
Thanks
I wrote my first Rails 3 app and it ran absolutely fine in development mode. Now I deployed it on my server and wanted to start it in production mode. The app starts but none of my images or stylesheets are being loaded. The Rails console outputs a lot of RoutingErrors to those files. Isn't that mode available yet?
I'm trying to do a manual jQuery AJAX request the following way:
$("#user_plan_id").change(function() {
$("#plan_container").load('/plans/' + this.value);
});
I have the "rails.js" file included in my header, and a "<%= csrf_meta_tag %".
I see from my log that the request IS getting to the server (although without the authenticity token... does rails.js even do this?), but the response is a 302 (Found) rather than 200, and no data actually gets rendered.
Any ideas?
Is there any way to to setup Rails generating files with tabs instead spaces?
Or maybe is there any way to auto replacing spaces to tabs in gedit?
Cause I really prefered tabs and it's really take some time to replace spaces to tabs in new generated files by Rails.
Thanks in advance!
I have a string called word and a function called infinitive such that
word.infinitive would return another string on some occasions and an empty string otherwise
I am trying to find an elegant ruby one line expression for the code-snippet below
if word.infinitive == ""
return word
else return word.infinitive
Had infinitive returned nil instead of "", I could have done something like
(word.infinitive or word)
But since it does not, I can't take advantage of the short-circuit OR
Ideally I would want
1) a single expression that I could easily embed in other code
2) the function infinitive being called only once
3) to not add any custom gems or plugins into my code
The config/environment.rb of my rails project contains this line:
RAILS_GEM_VERSION = '>= 2.3.2' unless defined? RAILS_GEM_VERSION
Which makes sure that only Rails of version 2.3.2 or greater will be used to run this app.
Is there a way of specifying both the lower and the upper boundary at the same time? So that it would run, say, only on versions higher than 2.3.1 and lower than 2.3.6?
I'd like to build a webapp in Rails in which I'd like to determine every pixel's color of a given image (JPEG). Is there any possibility to do that with Rails or JavaScript? The goal is to write an algorithm which determines the "middle color" of the image and uses it for background color of the site.
Any suggestion would be appreciated.
I have rubyonrails installed on my ubuntu 8.10 desktop. Script/generate came up with this error.
# script/generate
undefined method `index' for #<Enumerator: "Rails Info:":each_line>
any ideas?
Thanks for you help,
zeem
Is it possible to start an AMQP subscriber with my Rails app? Possibly through an initializer or something.
I'd like to have it running at the same time that can also interact with Rails models. Below is a pseudo-code example of what I mean.
queue.subscribe do |msg,body|
Foo.create(....)
end
Hello,
I am a ruby and rails newbie. And I am working on a rails application with RadRails. RadRails has a "Switch to Test" function for my controller, model, etc. but not for my library. if I have class Foo::Bar in /lib/foo/bar.rb, where should I put the unittest for it?
or should I separate the foo library in a separated project?
Thanks.
Hi,
I am planning to have something like this for a website that is onRubyonRails. User comes and enters a bunch of names in a text field, and a queue gets created from all the names. From there the website keeps asking more details for each one from the queue until the queue finishes.
Is there any queue management gem available in Ruby or I have to just create an array and keep incrementing the index in session variable to emulate a queue behaviour?