Hi there
Following Problem:
I need something like an empty scope. Which means that this scope is emtpy, but responds to all methods a scope usually responds to.
I'm currently using a little dirty hack. I simply supply "1=0" as conditions. I find this realy ugly, since it hits the database. Simply returning an empty array won't work, sin...
Hey Guys,
Looking for an easy to use vertical sidebar with the following conditions.
The sidebar follows you as you move down the page.
The sidebar contains a scrollbar for extra long lists.
Any help would be great!
Cheers,
Ash
...
I'm about to revisit an application that I've been trying to get off the ground for nearly a year now (keep getting sidetracked and too depressed to bother with it). The app was started with Rails 2.3, I believe and had a very minute amount of work done before it got abandoned. Coming back to Rails at this time, I see that 3.0 has been...
Okay, so I installed rvm and everything as root.
Then I installed Ruby Enterprise Edition with rvm.
Now I've been having a TON of issues with rake and rvm so far and I'm not too sure as to why.
I had to manually create links in my /usr/local/bin to rake to get rake working.
But when I passenger-install-nginx-module
Welcome to the Ph...
I read somewhere (I can't recall where exactly) that RoR has too many choices, I don't know much about RoR so I wondering if someone could explain this for me (or maybe its not true?).
Where exactly in the framework are the choices?
Can someone summarize the more popular plugins for RoR for me?
I gather these 'choices' are in:
ORM
t...
This is the error I get:
ContactPostalcardsController#skip (NoMethodError) "undefined method `status=' for #<ContactPostalcard:0x2b21433d64b0>"
This is the code calling it and trying to assign a value to the status attribute for ContactPostalcard (the Model):
def skip
@contact_postalcard = ContactPostalcard.new(params[:contact...
i have a problem implementing a list action with its own route. here is what i have
(just important parts)
routes.rb
map.resources :posts
map.login "login" ,:controller => "user_sessions" ,:action => "new"
map.logout "logout" , :controller => "user_sessions" , :action => "destroy"
map.sort "sort" , :controller => "pos...
I started learning Rails only a few days ago, but in the mean time I became very excited about a personal project. The project is quite hefty and would require several months to complete.
Right now, I can't wait to start doing that project but I'm a bit reluctant in writing it in PHP.
I've been working in PHP for a little more than a ye...
Is there a simple way of telling Devise to send all email via
delayed_job?
...
I want user to work with only one order connected to user's session. So I set singular resource for order
routes.rb:
resource :order
views/orders/new.html.erb:
<%= form_for @order do |f| %>
...
<% end %>
But when I open the new order page I get an error:
undefined method `orders_path`
I know, that I can set :url => order_pat...
A Rails/tool specific version of: How deep are your unit tests?
Right now, I currently write:
Cucumber features (integration tests) - these test against the HTML/JS that is returned by our app, but sometimes also tests other things, like calls to third-party services.
RSpec controller tests (functional tests), originally only if the c...
rails 3.0
<% link_to about_path, :remote => true do %>
About Us<span>Who we are</span>
<% end %>
def about
render :update do |page|
page[:content].replace_html :partial => 'dashboard/about'
end
end
Having issues with AJAX in rails 3.0 Just trying to get it replace the html with a partial one clicked. An...
Very simple AJAX call to make a div go up. Though it's not working. Trying to transition from 2.3.8 to 3.0. Any help is greatly appreciated. I've googled, though I'm not able to make any sense of the jargon. :( Thanks in advance
View:
<div class="test">
Whompa
</div>
<%= link_to 'Blind-Up', :controller=>:home,:actions=>:test, :remote...
I'm working on creating my first Rails 3 engine and I'm currently getting the following error message
is a Railtie/Engine and cannot be installed as plugin (RuntimeError)
To give you a bit more background I'm not doing the Engine as a gem, but I've place the Engine files in the vendor/plugins folder. I know there is an issue with load...
Hi
could you tell me a way to write this code in a better way ?
Create an user with data attributes fetched from facebook .
User.create do |user|
user.email = data['email']
user.password = Devise.friendly_token
user.facebook_uid = data['facebook_uid']
user.first_name = data['first_name']
user.last_name = data['las...
Trying to install memcached-northscale and getting a weird error. Any help would be appreciated.
$ sudo gem install memcached-northscale
Building native extensions. This could take a while...
ERROR: Error installing memcached-northscale:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/...
I have a partial in my rails app that loads the vote form (It's just a select with numbers ranging from 1-5). I'm now making another partial that loads up if the user has already voted it's suppose to be an EDIt partial where you get selected the value that you voted and if you wanted to you could change it. But for some reason is not wo...
Hi,
I have two models:
class Manufacturer < ActiveRecord::Base
has_many :models
end
class Model < ActiveRecord::Base
belongs_to :manufacturer
belongs_to :model
end
What I want to be able to do is find all manufacturers whose models belong to a given category:
manufacturers = Model.find(:all, :conditions=>["vehicle_category_id...
<%= link_to 'Testing', wak_path %>
*This requires a routes: match 'wak', :to => 'home#wak'
Did they take this out of rails 3.0 or what is going on?
<%= link_to 'Testing, :controller=>:home,:actions=>:wak %>
But in the views, I'm getting two different code, the top method works, though the second method dosen't have the same behavi...
Hi,
I've defined a function called hash_swap inside the User model, but when I call it it always says Method not found. How could I call a function inside the model ?
...