Hi everyone,
I'm maintaining a Ruby on Rails site and I'm confused as to how to perform redirects to relative URLs using the https protocol.
I can successfully create a redirect to a relative URL using http, for example:
redirect_to "/some_directory/"
But I cannot discern how to create a redirect to a URL using the https protocol. I...
I have created a new table including a column "note". The default is varchar(255) I believe but I wish to have this column be a text area vs. a field and to allow more data. I imagine that I would make this change in ActiveRecord::Migration file but I am curious as to the format. Do I simply change the varchar(255) to varchar(1000) for e...
I am attempting to add a note capability to my CRM that I am creating.I am employing an authenticated environment where users can manage their prospects. For instance, I sign up, I login, I can enter prospects and view them. So...I have created a prospects and user table and have them all working great. I am now trying to give the users ...
I seriously cant understand why this is so hard... I have some experience with other mvc frameworks but always heard rails was the easiest to code in.... right now I cant even get to my controller methods if i want to.
I used scaffold to creat 'student' which automatically created for me the controller, model and views for basic CRUD.. ...
I want to create my app using spanish controllers/methods.
can I use scaffold?
scaffold created methods like new, create, edit, etc
I want to change those to be nueva, crear, editar, etc
when I do that the app breaks because of REST routing rules
whats my best approach to this?
please help.
...
I am trying to develop a rails metal endpoint using sinatra, but is proving to be a pain because I have to restart the server every time I change the code. I am in Jruby and running from within a larger Java app. Is there an easy way to make this code refresh for every request?
...
Running a Ruby on Rails (RoR) app or Ruby code which uses the ActiveRecord framework, you get the error message:
Please install the postgresql adapter:
gem install
activerecord-postgresql-adapter
Trying to run:
gem install activerecord-postgresql-adapter
also fails, leaving you at a loss.
...
So for whatever reason this plugin will not maintain a role if there are no users added to it. A role whose last user is removed gets removed from the roles. Is there a workaround for this?
...
Where do I reference my controller (Rails) URL to show the dataset that I want in the autocomplete via JQuery? Here is my head:
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js"></script>...
I'm trying to install rails on Ubuntu 9.10.
gem list --local
*** LOCAL GEMS ***
actionmailer (2.3.4, 2.3.2)
actionpack (2.3.4, 2.3.2)
activerecord (2.3.4, 2.3.2)
activeresource (2.3.4, 2.3.2)
activesupport (2.3.4, 2.3.2)
rack (1.0.1)
rails (2.3.4, 2.3.2)
rake (0.8.7)
sqlite3-ruby (1.2.5)
rake
The program 'rake' is currently not insta...
Hi,
I am trying to install rails on Ubuntu 8.10, and met following errors. Please help me get through.Thanks.
root@pierr-desktop:~# gem install rails
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response 500 (http://gems.rubyforge.vm.bytemark.co.uk/gems/actionpack-2.3.4.gem)
#other information
root@pierr-des...
I am implementing a contact importer and will be geocoding the contacts that are imported. If a user imports 1000 contacts, geocoding is way too slow. Essentially I would like to start a background process to geocode the contacts after they are imported and somehow report the status to a log.
Does this sound like the best way to do ...
Using a :partial for the start of a "form_tag" and the "end" in a different :partial gave
"compile error" and "syntax error, unexpected kENSURE, expecting kEND".
Changing the "form_tag" to a standard HTML "form" tag fixes that but gives "ActionController::InvalidAuthenticityToken".
...
On a Rails site, I'd like to display a certain Twitter feed, with pagination so the visitor can see previous tweets (as far back as needed).
I implemented it using the Twitter gem, using Search method, which has a nice pagination method, but hit a limitation that Twitter will only return the statutes from the last two weeks. So after go...
I have the following class that I'd like access to within certain controllers in my app:
class Spreedly
include HTTParty
base_uri 'https://example.com/api/1234'
basic_auth 'user', 'xyz124'
headers 'Accept' => 'text/xml'
headers 'Content-Type' => 'text/xml'
format :xml
end
Where would I put that class so that I could then...
Can anyone tell me the way to zoom the image in Ruby on rails please ?
...
Is it possible to send SMS in india using rails applcations? If so, can you provide an example?
I checked for the clickatell but I think it works only in Australia or the UK.
...
I think I might have discovered a bug in Vestal Versions (http://github.com/laserlemon/vestal_versions) -- it seems like revert_to's behavior depends on the reverts I've done in the past with the same object. Here's an example:
>> a = Annotation.find(1384)
=> #<Annotation id: 1384, body: "Just hanging out -- \"playing possum\" -- at th...
I want to create a new instance of a model, however I want to bring some parameters from a different record also, essentially duplication most of the parameters into the new instance but leaving some fields blank as well.
Cloning it works (thanks @weppos)
# class RecipesController
def new
@parent = Recipe.find(params[:parent_id])
@...
Last week I successfully completed the transition of all our company applications from Ruby 1.8.6 to Ruby 1.8.7 including local and remote configurations.
From now on, development won't need to ensure backward-compatibility with Ruby 1.8.6.
For the sake of curiosity, I tried to run the test suite of a couple of projects against Ruby 1.9...