Displaying 20 results from an estimated 80000 matches similar to: "Awesome libraries"
2013 Mar 09
2
Default image_tag folder
Hey, guys. In documentation i read: "By default, files are loaded from
public/images". I add for example <%= image_tag "logo.gif" %>
When i check html code in browser i see next: <img alt="Logo"
src="/assets/public/images/logo.gif">. Why folder assets? The default
should have been <img alt="Logo"
2013 Apr 12
1
What is the meaning of the method to_param?
Hey!
Foe example i have next code:
test "should update user" do
put :update, id: @user.to_param, user: @input_attributes
assert_redirected_to users_path
end
What return id: @user.to_param?
--
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 unsubscribe from this group
2013 Jul 07
3
Convert Hex Color Value To HTML Color
Hey everyone. I''m new to ROR, and I followed and implemented the
beginner Ruby On Rails Tutorial (2nd Edition) code, and its working
great. For those who are unfamiliar, this creates a site that acts much
like Twitter.
If someone enter the hex value for a color (say #ff0000 for red), I
would like for ROR to convert that to an HTML color box representation
in
the post that is created. Any
2011 Nov 23
0
Awesome nested set - how to put there items?
hello guys,
I have following structure of the table, where I store items of tree:
| id | int(11) | NO | PRI | NULL | auto_increment |
| user_id | int(11) | YES | | NULL | |
| parent_id | int(11) | YES | | NULL | |
| lft | int(11) | YES | | NULL | |
| rgt | int(11) | YES
2013 May 29
2
Why can't get remote javascript libraries on Rails 4
In rails 3, I included this line:
*<%= javascript_include_tag
"http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js" %>*
But when migrate to rails 4, its not posible and I get the next error:
*Invalid argument -
C:/Ruby193/findiner/app/assets/javascripts/http://cdn.leafletjs.com/leaflet-0.5.1
*
So far, I won''t be able to get remote libraries. Thanks for help!
--
You
2012 Sep 10
5
flash[:notice] not working
Hi,
anybody please help me out,am using rails 3 but using this
flash[:notice] doesnot works, i have used this in controllers.
any idea ? please help.
Regards,
Manoj
--
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
2012 Aug 28
4
ArgumentError in HomeController#index
Hey guys, I''m new to ruby/rails and trying to sort something...
I just created an app with composer,
http://railsapps.github.com/rails-composer/
I used the command:
rails new myapp -m
https://raw.github.com/RailsApps/rails-composer/master/composer.rb
I set up the rails server, and tried to load the app on localhost:3000
However, I end up with:
ArgumentError in HomeController#index
2013 Apr 21
5
Where to find info about seed.rb, db:seed functionality?
There is no any mention about it neither in API nor in Guide. How to use
these features? The only gist with two sentences is in db/seed.rb file.
That''s really not enough.
--
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 unsubscribe from this group and stop receiving emails
2012 Nov 18
3
remarkable activerecord association RSpec
i''m using gem Remarkable activerecord for association. i''ve installed
remarkable and remarkable activerecrod both gem. i''ve added both gem in
my Gemfile. i''ve added "remarkable_activerecord" as required in
spec_helper.rb.
describe Authentication do
FactoryGirl.build(:authentication).should
belong_to(:user)
2013 Jan 03
8
How to Install Ruby and Rails
I want to install Ruby 1.8.7 and Rails 2.8.3,i am using ubuntu 11. Thank
you
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2012 Aug 01
2
'redirect_to' taking infinite loop.
Hi,
The following controller method taking me into infinite loop. Once the
update action completes I want to reload the ''index'' page. May I know
why it is going into infinite loop?
def update
Device.find_by_id( params[:device_id] ).driver = (
params[:driver_id] == 0 ) ? nil : Driver.find_by_id( params[:driver_id]
)
redirect_to :action => :index, :tab =>
2012 Sep 04
5
Associations and Math between Models
I''ve setup two models, 1 and 2, that are associated by
has_and_belongs_to_many. I''m trying to get an attribute from model_1 to use
in a method in model_2. When I use the code below, I get an error saying
''undefined method model_1_id''. What am I missing? Thanks!
Model_2.rb
Class Model_2 < ActiveRecord::Base
...
has_and_belongs_to_many :model_1
def
2012 Jul 18
5
string array to integer array
array=["1","3","4"]
How do i convert this array to
sessionarraydb_array=[1,3,4,]
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from
2013 May 07
4
Rake db:migrate
Hello,
I''m trying to use command rake db:migrate, but in MySQL I continuous get
an empty set and I do know why.
#/db/seeds.rb
User.create(username: "lorenz", password: "mypass", admin: true)
When I run:
rake db:seed RAILS_ENV=development --trace
I received:
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
**
2013 Jul 09
2
can i use single devise for multiple models.
Hi,
i need to use authentication for the 4 models,is it possible to use
single devise for all models,if yes plz let me know them clearly.
if not what is the solution.
Thankyou
--
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 unsubscribe from this group and stop receiving emails
2013 Jan 19
2
PROBLEM WITH FCK EDITOR
HI ALL,
1. i am using fck editor in my application.
2. when i type any text in fck editor it was saved in hml format
in database(i.e, mysql)
3. when i was try to retrieve the text it will displaying in html
format not as plain text
how to solve this problem???please help me??thanks in advance??
--
Posted via http://www.ruby-forum.com/.
--
You received this message
2012 Jul 19
5
ActiveScaffold Export file - Send as Email
I am using Rails 1.2.3 and Active scaffold 1.1.1
My requirement is to send the export of users data weekly to the admin
as email via cron.
How can i automate the process of exporting csv and storing it at a
place? So that i can pick it from there and attach to the email before
sending?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the
2013 Apr 27
4
required field for one, optional for another
rails 3.2.11
My app has User model, its one of the fields is entrepreneur:boolean.
So users have two types; one is normal users, the other is professional
users.
For normal users, only emails and usernames are required and other
fields are optional.
For professional users, in addition to above, addresses and real names
are required.
Is there any Ruby way to set the requirement depending on the
2013 Jul 25
3
User Role authorisation
Hello, Currently I am working on a app, so far I have User (with devise)
which are able to create projects. So, if user1 creates project A and
project B I want him, to be able to assign user2 with role admin on
project A, and user2 with moderator role on project B. I was thinking in
creating a UserRoleProject link table, is it a good idea? Or if not
please help me with some pointers.
The action
2012 Dec 24
4
Bad idea to add/remove associations in after_find
I have 2 distinct types of users (artists and curators) in my system and
they currently share all associations (eg has_one :portfolio).
However, a curator shouldn''t have a portfolio so I would like to only
add that association when required. Obviously I could just return nil
for that method, but it doesn''t feel right having that there in the
first place.
What''s the best