Hello!
I'm building a simple CMS on Rails and I'm thinking about how I can package it so that I can easily reuse it in other projects and eventually share it as open source.
This leaves me wondering if it's possible to package it as a gem, with views, controllers, models, images, stylesheets, etc, and later just include it in a new sit...
I'm new to Rails and I'm building a simple project-tracking app for my employer. I've been developing the app on my Mac and pushing it to github. I just managed to clone my github repo to a windows box behind my company's firewall in hopes of letting colleagues try the app out.
But when I go to rake db:migrate to initialize the database...
Hi,
I install plugin attachment_fu for uploading an images in rails.
It's working properly but the thumbnail for .bmp and .tiff images is not created through RMagic processor.
What can I do for creating thubnail for .bmp and .tiff image format.
Please give the solution over it.
Thanks.
...
I want to fetch only changed attributes of an object. Is there any method available which returns all the updated attributes?
...
Hi,
Does anyone know what is needed to create an EngineYard-like service for other languages? Where should one start?
Thanks
...
Hello, I'm building a Rails 3 app and am trying to install acts_as_commentable
Here's what I did:
Added to my Gemfile:
gem "acts_as_commentable"
Ran bundle install
Generated a Migration with the comments.rb (Comments table was created correctly)
I then wanted to enable my book controller for commenting, so I added to books_controll...
I have an application that detects the subdomain on a request and sets the result to a variable.
e.g.
before_filter :get_trust_from_subdomain
def get_trust_from_subdomain
@selected_trust = "test"
end
How can I test this with Test::Unit / Shoulda? I don't see a way of getting into ApplicationController and seeing what's set...
...
I have a typical search facility in my app which returns a list of results that can be paginated, sorted, viewed with a different records_per_page value, etc. Each of these options is controlled by parameters in the query string. A simplified example:
/search?q=test&page=2
Now say I need to display a set of links that set records_per...
I have an observe_field call in my app like this:
= observe_field "marketSelect", :update => "merchantSelect", :with => "id", :url => { :controller => "markets", :action => "get_merchants" }
That code activates the following action in my markets controller:
@merchants = @market.merchants.sort_by { |merchants| merchants.name }
Tha...
I have a jQuery function that updates my data ever few seconds.
But! It's not parsing the javascript it's loading. It just calls it appropriately every few seconds, and replaces my content with unparsed javascript code.
setupMediaIndexPoller: function(organization) {
url = '/organizations/' + organization + '/media/photos_and_video...
How can I use ActiveRecord's accepts_nested_attributes_for helper in a has_many :through association while adding attributes to the join table?
For example, say I've got a Team model:
class Team < ActiveRecord::Base
role = Role.find_by_name('player')
has_many :players,
:through => :interactions,
:source...
This seems incredibly similar to a question I had answered just a few days ago, but the solution then isn't working now.
I'm building a rails app, and I am trying to have a button_to trigger a destroy in a different controller.
the code I have for the button is
<%= button_to "delete", :controller => :meals,
...
I am using changed?,changes methods on console and that's working fine ...
But inside my model it's not returning expected result ..
I am using flex as my front end ..
Any idea about it ?? RubyAmf causing problem ??
...
I've been developing a web application and a lot of customers are asking if they can host the application in their network (for security reasons). I have been looking for a way to package up a rails app into a single executable (with server and all), but haven't been able to find anything. My other requirement is that we distribute it ...
<%= 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...
Rails 3.0
After doing
rake db:sessions:create
then adding the line of code in the session_store.rb,
CouponManager::Application.config.session_store :active_record_store
What else needs to be done before I'm capable of using sessions like
session[:ttl_qty] = 5
...
I have a question with turning this html into erb.
<button name="support" type="button" value="Get Support" class="brightOrange">
<span>Get Support</span>
</button>
I've been trying to do something like this in rails.
<% form_tag get_support_path do %>
<%= text_field_tag :email, "Email:" %>
<% submit_tag "Join", :class=>"bri...
I'm working on a Ruby on Rails web app, in which I've got several lists of posts. Each post will use Ajax to load their comments. In order of populating them in the right place, I'm doing the following:
Each post has a div with an id formatted as follows: <div id="my_div_<%= post.id %>"></div>. So, for example if the post.id is 12, the ...
Is there any way to send emails in rails 3 to a local file or so, instead of using an SMTP server? I'd like to test the email's contents without using any kind of SMTP, ideally only in DEV environment.
The best would be a local SMTP or something that allowed me to inspect emails, check email addresses, etc.
...
I'm using ruby 1.8.7 and I need to compare two hashes that I have, which are essentially the attributes of a model. Hash A is smaller than Hash B, and Hash B has all of the attributes of hash A, plus some extra attributes I don't care about. My overarching goal is to see if the elements of A are the same as the respective elements of B...