On Mon, Nov 28, 2011 at 9:11 AM, newrails user newror.u...@gmail.comwrote:
Hi all,
I am facing problem in getting subdomain name inside the model. The
following is my setup.
I am using cancan for authorization.I wanted a specific condition in
Ability.rb ( the file which is placed in models
Hi Everyone,
I am going through a tutorial of Rails, I have created a database,
models and controllers. In the example it says when entering the
http://localhost:3000/users/1
URL in the browser it should show the first record in the database in
the browser.
On 29 November 2011 10:30, Somnath Mallick li...@ruby-forum.com wrote:
Hi Everyone,
I am going through a tutorial of Rails, I have created a database,
models and controllers. In the example it says when entering the
http://localhost:3000/users/1
URL in the browser it should show the
Started GET /users/1 for 127.0.0.1 at 2011-11-29 17:19:31 +0530
Processing by UsersController#show as HTML
Parameters: {id=1}
User Load (0.0ms) SELECT users.* FROM users WHERE users.id =
? LIMIT 1 [[id, 1]]
Completed 404 Not Found in 15ms
ActiveRecord::RecordNotFound (Couldn't find User
On Nov 29, 4:04 am, sachin sachinkew...@gmail.com wrote:
hi all,
i am new to ROR,I have one ROR app developed in old version i upgrade
it with following version:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.2
- RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
Did you
On Nov 29, 9:04 am, Somnath Mallick li...@ruby-forum.com wrote:
irb(main):012:0 user.find(1)
NoMethodError: undefined method `find' for #User:0x1d401b0
from
You should find the class, not the instance:
User.find(1)
Why doesn't this site have something like code tags or
On 29 November 2011 12:04, Somnath Mallick li...@ruby-forum.com wrote:
Started GET /users/1 for 127.0.0.1 at 2011-11-29 17:19:31 +0530
Processing by UsersController#show as HTML
Parameters: {id=1}
User Load (0.0ms) SELECT users.* FROM users WHERE users.id =
? LIMIT 1 [[id, 1]]
Completed
On 29 November 2011 12:04, Somnath Mallick li...@ruby-forum.com wrote:
irb(main):003:0 user = User.new(:name = Michael Hartl, :email =
mha...@example.com)
= #User id: nil, name: Michael Hartl, email: mha...@example.com,
created_at: nil, updated_at: nil
irb(main):006:0 user.save
On 29 November 2011 12:18, Colin Law clan...@googlemail.com wrote:
On 29 November 2011 12:04, Somnath Mallick li...@ruby-forum.com wrote:
ActiveRecord::RecordNotFound (Couldn't find User with id=1):
app/controllers/users_controller.rb:4:in `show'
Can you show us the code for users_controller
$ rails console --sandbox
Loading development environment in sandbox (Rails 3.1.3)
Any modifications you make will be rolled back on exit
irb(main):001:0 User.new
= #User id: nil, name: nil, email: nil, created_at: nil, updated_at:
nil
irb(main):002:0 User.first
←[1m←[36mUser Load (0.0ms)←[0m
On 29 November 2011 12:30, Somnath Mallick li...@ruby-forum.com wrote:
$ rails console --sandbox
ermm sandbox? ;-)
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to
On 29 November 2011 12:30, Somnath Mallick li...@ruby-forum.com wrote:
$ rails console --sandbox
Loading development environment in sandbox (Rails 3.1.3)
Any modifications you make will be rolled back on exit
irb(main):001:0 User.new
= #User id: nil, name: nil, email: nil, created_at: nil,
OK.. I will give it a try!
I think i have to redo all the commands and add data all over again!
Currently i get:
$ rails console
Loading development environment (Rails 3.1.3)
irb(main):001:0 User.find(1)
←[1m←[36mUser Load (31.2ms)←[0m ←[1mSELECT users.* FROM users
WHERE users.id = ? LIMIT
On Nov 28, 2:57 pm, Michael Pavling pavl...@gmail.com wrote:
On 28 November 2011 15:37, gojinj...@gmail.com gojinj...@gmail.com wrote:
What we offer: we are planning to hit revenue at version 0.7 and
definitely will offer a salary once we get there and in the meantime
we can discuss for
On 29 November 2011 12:47, Somnath Mallick li...@ruby-forum.com wrote:
But how come coming out of the sandbox console deletes data from the
database? Database values should be persistent right? That is the whole
idea of a DB, or am i missing something here?
Yes - you're missing the point that
i have images such as this
http://www.cairo360.com/resource.servlet?path=event/6178/event_standard_6178_20112111_542213373.jpeg
its Content-Type: text/html;
carrierwave dosent recognize it as image
is there is any way to fix that ?
--
Posted via http://www.ruby-forum.com/.
--
You received
Hi All,
I am using the unicorn server for my rails application. When I invoke a
HTTP request with the length of query string greater than the acceptable
one, I have received the HTTP response code as 400 (Invalid URL) instead of
getting the 414 code (The requested URL's length exceeds the
On 29 November 2011 12:47, Somnath Mallick li...@ruby-forum.com wrote:
OK.. I will give it a try!
I think i have to redo all the commands and add data all over again!
If you have a lot of data to load manually you can do it by putting
code in db/seeds.rb then running
rake db:seed
...
But
Hello,
Is there a way to run initializer code (in config/initializers) only
on rails server, and not on rails console?
Thank you!
Henrique
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to
I got it working now! Thanks guys! Will be back tomorrow with some other
problem! :)
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to
Is there some gem or technique that will let us write only .html.erb
templates for our Rails 3 mailers, and gracefully degrade them by
stripping HTML tags for the text/plain version, rather than having to
create each partial twice?
Google is seriously failing me, so I must be searching for the
On Nov 29, 3:17 pm, Jay Levitt li...@ruby-forum.com wrote:
Is there some gem or technique that will let us write only .html.erb
templates for our Rails 3 mailers, and gracefully degrade them by
stripping HTML tags for the text/plain version, rather than having to
create each partial twice?
Rails 3.1 and I'm working through activeldap which is not exactly ActiveRecord
class Group ActiveLdap::Base
def validate
errors.add(:base, You must enter a value for the 'Common name') unless
self.cn.to_s != ''
errors.add(:base, You must enter a value for the 'GID Number') unless
Hi to all,
I think I have understand the problem. When you made a PUT of this type:
playlist
id7/id
namemetal/name
images_attributes type=array
image
id3/id
/image
/images_attributes
/playlist
Rails suppose that:
Or your are creating the playlist and the image or you are updating
Hi everyone,
I'm trying to write integration tests for my sample twitter app and
I'm having trouble mocking out objects in the Twitter namespace.
Here's the function that's giving me trouble:
def build_twitter(omniauth)
Twitter.configure do |config|
config.consumer_key = TWITTER_KEY
Hello Friends,
I have a requirement where I want to create two different sheet in a same
csv file.
And I want to rename the sheet1 to something.
But I am not able to get it.
It will be great if someone can help me
Thanks
Abhishek Shukla
--
You received this message because you are
On Tue, Nov 29, 2011 at 08:04, Mahmoud F. li...@ruby-forum.com wrote:
i have images such as this
http://www.cairo360.com/resource.servlet?path=event/6178/event_standard_6178_20112111_542213373.jpeg
its Content-Type: text/html;
carrierwave dosent recognize it as image
Because text/html isn't
Hi people
I want to know which is the best gem or plug-in to store and track
register changes for a rails 3.0.9 app
Hope you can help me, thanks
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to
On Tue, Nov 29, 2011 at 13:18, Abhishek shukla bettera...@gmail.com wrote:
I have a requirement where I want to create two different sheet in a same
csv file.
Does it really have to be multiple sheets? AFAIK there is no standard
for how to do that. Maybe it would suffice to have them on one
On 29 November 2011 18:33, Angelo Cordova acord...@gmail.com wrote:
Hi people
I want to know which is the best gem or plug-in to store and track
register changes for a rails 3.0.9 app
It is not clear what it is that is changing (a register?). Is it
changes to data in the database or code
On 29 nov, 17:14, Colin Law clan...@googlemail.com wrote:
On 29 November 2011 18:33, Angelo Cordova acord...@gmail.com wrote:
Hi people
I want to know which is the best gem or plug-in to store and track
register changes for a rails 3.0.9 app
It is not clear what it is that is
On Nov 29, 2011, at 2:11 PM, Angelo Cordova wrote:
On 29 nov, 17:14, Colin Law clan...@googlemail.com wrote:
On 29 November 2011 18:33, Angelo Cordova acord...@gmail.com wrote:
Hi people
I want to know which is the best gem or plug-in to store and track
register changes for a rails
On Nov 29, 5:37 pm, Craig White craig.wh...@ttiltd.com wrote:
Rails 3.1 and I'm working through activeldap which is not exactly ActiveRecord
class Group ActiveLdap::Base
def validate
errors.add(:base, You must enter a value for the 'Common name') unless
self.cn.to_s != ''
Hello,
could you please explain what's wrong with this code:
Rails 3.1.1
skills_controller.rb
class SkillsController ApplicationController
# GET /skills
# GET /skills.json
def index
@skills = Skill.all
respond_to do |format|
format.html # index.html.erb
Hi,
This question may asked so many times. I google about it and got lots of
discuss generally. After reading all of them, I go to
a conclusion is choose the framework which your understand to it is the
most. But we are willing to lean new language or framrwork to make our app
better.
So we
Hi,
I issue the following commands:
rails new dummy_app
cd dummy_app
rake doc:rails
When issuing the last command I notice that rake aborts due to denied
permissions. See below.
rm -r doc/api
Parsing sources…
100% [485/485] /opt/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails.rb
On Nov 29, 6:05 pm, spinlock atomicbroadc...@gmail.com wrote:
Hi everyone,
I'm trying to write integration tests for my sample twitter app and
I'm having trouble mocking out objects in the Twitter namespace.
Here's the function that's giving me trouble:
def build_twitter(omniauth)
i`m in the same situation and did the following in view:
%= text_field_tag('book[price]', @book.price) %
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to
On Nov 29, 7:11 pm, DmitryS dmitry.g.shul...@gmail.com wrote:
_skills_list.html.erb
div id=skills_list
table
tr
thTitle/th
thParent/th
/tr
% @skills.each do |skill| %
tr
td%= skill.title %/td
td%= skill.parent_id %/td
/tr
% end %
/table
/div
It
On Nov 29, 2011, at 4:25 PM, Frederick Cheung wrote:
On Nov 29, 5:37 pm, Craig White craig.wh...@ttiltd.com wrote:
Rails 3.1 and I'm working through activeldap which is not exactly
ActiveRecord
class Group ActiveLdap::Base
def validate
errors.add(:base, You must enter a value for
I was a PHP Developer before switching to ROR, and here are some reasons to use
RoR.
1. Build a business web application.
Of course :) Almost all frameworks can do this nowadays, including RoR
2. Easy to maintain, update.
Code is highly readable, and Ruby's core priciples include Developer
Good afternoon,
Is there a Ruby ORM gem which integrates with MS Access?
Alternatively how would I convert one to PostgreSQL or MySQL then
interpret it into ORM syntax for use in Ruby?
Thanks for all suggestions,
Alec Taylor
--
You received this message because you are subscribed to the
Hi
have you tried the method request.subdomain
Checkout the railscast on subdomains for more info
http://railscasts.com/episodes/221-subdomains-in-rails-3
Bye
Rik
On Nov 29, 10:44 am, Jim Ruther Nill jvn...@gmail.com wrote:
On Mon, Nov 28, 2011 at 9:11 AM, newrails user
43 matches
Mail list logo